misc_pterodactyl-panel/app/Repositories/Wings/ServerRepository.php

90 lines
2.1 KiB
PHP
Raw Normal View History

<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Repositories\Wings;
2017-10-09 01:57:59 +00:00
use Psr\Http\Message\ResponseInterface;
use Pterodactyl\Exceptions\PterodactylException;
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface;
class ServerRepository extends BaseRepository implements ServerRepositoryInterface
{
/**
* {@inheritdoc}
*/
2017-10-09 01:57:59 +00:00
public function create(array $structure, array $overrides = []): ResponseInterface
{
throw new PterodactylException('This feature is not yet implemented.');
}
/**
* {@inheritdoc}
*/
public function update(array $data)
{
throw new PterodactylException('This feature is not yet implemented.');
}
/**
* {@inheritdoc}
*/
public function reinstall($data = null)
{
throw new PterodactylException('This feature is not yet implemented.');
}
/**
* {@inheritdoc}
*/
public function rebuild()
{
2017-10-01 02:00:24 +00:00
return $this->getHttpClient()->request('POST', 'server/' . $this->getAccessServer() . '/rebuild');
}
/**
* {@inheritdoc}
*/
public function suspend()
{
2017-10-01 02:00:24 +00:00
return $this->getHttpClient()->request('POST', 'server/' . $this->getAccessServer() . '/suspend');
}
/**
* {@inheritdoc}
*/
public function unsuspend()
{
2017-10-01 02:00:24 +00:00
return $this->getHttpClient()->request('POST', 'server/' . $this->getAccessServer() . '/unsuspend');
}
/**
* {@inheritdoc}
*/
public function delete()
{
2017-10-01 02:00:24 +00:00
return $this->getHttpClient()->request('DELETE', 'server/' . $this->getAccessServer());
}
/**
* {@inheritdoc}
*/
public function details()
{
2017-10-01 02:00:24 +00:00
return $this->getHttpClient()->request('GET', 'server/' . $this->getAccessServer());
}
/**
* {@inheritdoc}
*/
public function revokeAccessKey($key)
{
throw new PterodactylException('This feature is not yet implemented.');
}
}