2016-10-10 10:57:39 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
Route::group(['prefix' => 'api'], function() {
|
|
|
|
Route::post('/login', 'UserController@login');
|
|
|
|
Route::get('/logout', 'UserController@logout');
|
|
|
|
|
2016-11-28 08:48:12 +01:00
|
|
|
Route::get('/items/{type}/{orderBy}', 'ItemController@items');
|
2016-10-10 10:57:39 +02:00
|
|
|
Route::get('/search-items', 'ItemController@search');
|
|
|
|
|
2016-11-28 08:48:12 +01:00
|
|
|
Route::get('/suggestions/{tmdbID}/{mediaType}', 'TMDBController@suggestions');
|
2016-10-14 12:15:54 +02:00
|
|
|
Route::get('/trending', 'TMDBController@trending');
|
2016-10-14 13:25:52 +02:00
|
|
|
Route::get('/upcoming', 'TMDBController@upcoming');
|
2016-10-10 15:14:57 +02:00
|
|
|
|
2016-10-19 09:53:35 +02:00
|
|
|
Route::get('/settings', 'SettingController@settings');
|
|
|
|
|
2016-10-10 10:57:39 +02:00
|
|
|
Route::group(['middleware' => 'auth'], function() {
|
2016-10-18 14:26:24 +02:00
|
|
|
Route::get('/export', 'SettingController@export');
|
|
|
|
Route::post('/import', 'SettingController@import');
|
|
|
|
|
2016-11-30 11:39:47 +01:00
|
|
|
Route::get('/check-update', 'SettingController@checkUpdate');
|
2017-01-06 09:40:27 +01:00
|
|
|
// todo: POST
|
|
|
|
Route::get('/fetch-files', 'SettingController@fetchFiles');
|
2016-11-30 11:39:47 +01:00
|
|
|
|
2016-10-19 11:19:34 +02:00
|
|
|
Route::get('/sync-scout', 'SettingController@syncScout');
|
2016-12-17 16:59:59 +01:00
|
|
|
Route::patch('/update-genre', 'SettingController@updateGenre');
|
2016-10-18 14:26:24 +02:00
|
|
|
Route::patch('/settings', 'SettingController@changeSettings');
|
2016-12-17 16:59:59 +01:00
|
|
|
Route::patch('/update-alternative-titles/{tmdbID?}', 'ItemController@updateAlternativeTitles');
|
2016-10-13 11:11:10 +02:00
|
|
|
|
2016-10-18 09:57:47 +02:00
|
|
|
Route::patch('/userdata', 'UserController@changeUserData');
|
2016-11-28 08:48:12 +01:00
|
|
|
Route::patch('/set-seen/{id}', 'ItemController@setSeen');
|
2016-11-30 15:26:38 +01:00
|
|
|
Route::patch('/toggle-season', 'ItemController@toggleSeason');
|
2016-11-28 08:48:12 +01:00
|
|
|
Route::get('/episodes/{tmdb_id}', 'ItemController@episodes');
|
2016-10-10 12:26:55 +02:00
|
|
|
|
2016-10-10 10:57:39 +02:00
|
|
|
Route::get('/search-tmdb', 'TMDBController@search');
|
|
|
|
Route::post('/add', 'ItemController@add');
|
|
|
|
Route::patch('/change-rating/{itemID}', 'ItemController@changeRating');
|
|
|
|
Route::delete('/remove/{itemID}', 'ItemController@remove');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2016-11-23 21:16:41 +01:00
|
|
|
Route::get('/{uri?}', 'HomeController@app')->where('uri', '(.*)');
|