phpvms/app/Routes/api.php

60 lines
2.1 KiB
PHP
Raw Normal View History

2017-06-09 02:28:26 +08:00
<?php
/**
* public routes
*/
Route::group([], function()
{
2017-12-29 04:35:28 +08:00
Route::get('acars', 'AcarsController@index');
Route::get('airlines', 'AirlineController@index');
Route::get('airlines/{id}', 'AirlineController@get');
Route::get('airports', 'AirportController@index');
2018-01-06 05:30:35 +08:00
Route::get('airports/hubs', 'AirportController@index_hubs');
Route::get('airports/{id}', 'AirportController@get');
Route::get('airports/{id}/lookup', 'AirportController@lookup');
Route::get('fleet', 'FleetController@index');
Route::get('fleet/aircraft/{id}', 'FleetController@get_aircraft');
Route::get('flights', 'FlightController@index');
2017-12-29 04:35:28 +08:00
Route::get('flights/search', 'FlightController@search');
Route::get('flights/{id}', 'FlightController@get');
Route::get('pireps/{id}', 'PirepController@get');
Route::get('pireps/{id}/route', 'PirepController@route_get');
2018-01-06 03:13:56 +08:00
Route::get('pireps/{id}/acars/position', 'PirepController@acars_get');
Route::get('pireps/{id}/acars/geojson', 'PirepController@acars_geojson');
2017-12-29 08:00:35 +08:00
Route::get('status', 'StatusController@status');
Route::get('version', 'StatusController@status');
});
2017-08-15 12:36:49 +08:00
/**
* these need to be authenticated with a user's API key
*/
Route::group(['middleware' => ['api.auth']], function ()
{
2017-12-29 04:35:28 +08:00
Route::post('pireps/prefile', 'PirepController@prefile');
Route::post('pireps/{id}/file', 'PirepController@file');
Route::delete('pireps/{id}/cancel', 'PirepController@cancel');
2018-01-05 09:33:23 +08:00
Route::post('pireps/{id}/acars/position', 'PirepController@acars_store');
Route::post('pireps/{id}/acars/positions', 'PirepController@acars_store');
Route::post('pireps/{id}/acars/log', 'PirepController@acars_log');
Route::post('pireps/{id}/acars/logs', 'PirepController@acars_log');
2018-01-05 09:33:23 +08:00
Route::post('pireps/{id}/route', 'PirepController@route_post');
Route::delete('pireps/{id}/route', 'PirepController@route_delete');
Route::get('settings', 'SettingsController@index');
# This is the info of the user whose token is in use
2017-12-29 04:35:28 +08:00
Route::get('user', 'UserController@index');
2017-12-29 04:35:28 +08:00
Route::get('users/{id}', 'UserController@get');
Route::get('users/{id}/bids', 'UserController@bids');
2017-08-15 07:26:20 +08:00
});