Finish base API.
Making PR, any additional API functions or modifications can be done within the repository now.
This commit is contained in:
parent
77e3744b40
commit
ac65d5fa21
8 changed files with 249 additions and 6 deletions
|
@ -49,11 +49,31 @@ class APIRoutes
|
|||
'uses' => 'Pterodactyl\Http\Controllers\API\ServerController@getServers'
|
||||
]);
|
||||
|
||||
$api->post('servers', [
|
||||
'as' => 'api.servers.post',
|
||||
'uses' => 'Pterodactyl\Http\Controllers\API\ServerController@postServer'
|
||||
]);
|
||||
|
||||
$api->get('servers/{id}', [
|
||||
'as' => 'api.servers.view',
|
||||
'uses' => 'Pterodactyl\Http\Controllers\API\ServerController@getServer'
|
||||
]);
|
||||
|
||||
$api->post('servers/{id}/suspend', [
|
||||
'as' => 'api.servers.suspend',
|
||||
'uses' => 'Pterodactyl\Http\Controllers\API\ServerController@postServerSuspend'
|
||||
]);
|
||||
|
||||
$api->post('servers/{id}/unsuspend', [
|
||||
'as' => 'api.servers.unsuspend',
|
||||
'uses' => 'Pterodactyl\Http\Controllers\API\ServerController@postServerUnsuspend'
|
||||
]);
|
||||
|
||||
$api->delete('servers/{id}/{force?}', [
|
||||
'as' => 'api.servers.delete',
|
||||
'uses' => 'Pterodactyl\Http\Controllers\API\ServerController@deleteServer'
|
||||
]);
|
||||
|
||||
/**
|
||||
* Node Routes
|
||||
*/
|
||||
|
@ -73,10 +93,15 @@ class APIRoutes
|
|||
]);
|
||||
|
||||
$api->get('nodes/{id}/allocations', [
|
||||
'as' => 'api.nodes.view',
|
||||
'as' => 'api.nodes.view_allocations',
|
||||
'uses' => 'Pterodactyl\Http\Controllers\API\NodeController@getNodeAllocations'
|
||||
]);
|
||||
|
||||
$api->delete('nodes/{id}', [
|
||||
'as' => 'api.nodes.view',
|
||||
'uses' => 'Pterodactyl\Http\Controllers\API\NodeController@deleteNode'
|
||||
]);
|
||||
|
||||
/**
|
||||
* Location Routes
|
||||
*/
|
||||
|
@ -85,6 +110,19 @@ class APIRoutes
|
|||
'uses' => 'Pterodactyl\Http\Controllers\API\LocationController@getLocations'
|
||||
]);
|
||||
|
||||
/**
|
||||
* Service Routes
|
||||
*/
|
||||
$api->get('services', [
|
||||
'as' => 'api.services',
|
||||
'uses' => 'Pterodactyl\Http\Controllers\API\ServiceController@getServices'
|
||||
]);
|
||||
|
||||
$api->get('services/{id}', [
|
||||
'as' => 'api.services.view',
|
||||
'uses' => 'Pterodactyl\Http\Controllers\API\ServiceController@getService'
|
||||
]);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue