2016-10-10 10:57:39 +02:00
|
|
|
<?php
|
|
|
|
|
2017-11-03 13:53:28 +01:00
|
|
|
Route::prefix('api')->group(function() {
|
2016-10-10 10:57:39 +02:00
|
|
|
Route::get('/logout', 'UserController@logout');
|
2017-03-06 09:40:58 +01:00
|
|
|
Route::post('/login', 'UserController@login');
|
2016-10-10 10:57:39 +02:00
|
|
|
|
2017-03-06 09:40:58 +01:00
|
|
|
Route::get('/episodes/{tmdbId}', 'ItemController@episodes');
|
2017-08-05 18:40:36 +02:00
|
|
|
Route::get('/items/{type}/{orderBy}/{sortDirection}', 'ItemController@items');
|
2016-10-10 10:57:39 +02:00
|
|
|
Route::get('/search-items', 'ItemController@search');
|
2018-11-09 22:10:33 +01:00
|
|
|
|
|
|
|
Route::get('/calendar', 'CalendarController@items');
|
2016-10-10 10:57:39 +02:00
|
|
|
|
2017-04-11 08:45:08 +02:00
|
|
|
Route::get('/item/{tmdbId}/{mediaType}', 'SubpageController@item');
|
|
|
|
Route::get('/imdb-rating/{imdbId}', 'SubpageController@imdbRating');
|
|
|
|
|
2016-11-28 08:48:12 +01:00
|
|
|
Route::get('/suggestions/{tmdbID}/{mediaType}', 'TMDBController@suggestions');
|
2018-03-11 21:08:44 +01:00
|
|
|
Route::get('/genres', 'GenreController@allGenres');
|
|
|
|
Route::get('/genre/{genre}', 'TMDBController@genre');
|
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');
|
2017-07-31 09:21:44 +02:00
|
|
|
Route::get('/now-playing', 'TMDBController@nowPlaying');
|
2016-10-10 15:14:57 +02:00
|
|
|
|
2017-07-28 11:37:33 +02:00
|
|
|
Route::patch('/refresh-all', 'ItemController@refreshAll');
|
2016-10-19 09:53:35 +02:00
|
|
|
Route::get('/settings', 'SettingController@settings');
|
|
|
|
|
2017-11-03 13:53:28 +01:00
|
|
|
Route::middleware('auth')->group(function() {
|
2017-01-24 16:11:47 +01:00
|
|
|
Route::get('/check-update', 'SettingController@checkForUpdate');
|
2017-03-06 09:40:58 +01:00
|
|
|
Route::get('/version', 'SettingController@getVersion');
|
2018-12-27 21:35:41 +01:00
|
|
|
Route::patch('/settings/refresh', 'SettingController@updateRefresh');
|
|
|
|
Route::patch('/settings/reminders-send-to', 'SettingController@updateRemindersSendTo');
|
|
|
|
Route::patch('/settings/reminder-options', 'SettingController@updateReminderOptions');
|
2017-01-27 10:25:43 +01:00
|
|
|
Route::patch('/settings', 'SettingController@updateSettings');
|
2017-03-06 09:40:58 +01:00
|
|
|
|
|
|
|
Route::post('/add', 'ItemController@add');
|
2017-07-31 09:21:44 +02:00
|
|
|
Route::post('/watchlist', 'ItemController@watchlist');
|
2017-03-04 02:01:50 +01:00
|
|
|
Route::patch('/update-alternative-titles/{tmdbId?}', 'ItemController@updateAlternativeTitles');
|
2017-03-06 09:40:58 +01:00
|
|
|
Route::patch('/update-genre', 'ItemController@updateGenre');
|
|
|
|
Route::patch('/toggle-episode/{id}', 'ItemController@toggleEpisode');
|
|
|
|
Route::patch('/toggle-season', 'ItemController@toggleSeason');
|
|
|
|
Route::patch('/change-rating/{itemId}', 'ItemController@changeRating');
|
2017-11-03 13:53:28 +01:00
|
|
|
Route::patch('/refresh/{itemId}', 'ItemController@refresh');
|
2017-04-11 11:28:58 +02:00
|
|
|
Route::delete('/remove/{itemId}', 'ItemController@remove')->middleware('csrf');
|
2016-10-13 11:11:10 +02:00
|
|
|
|
2017-01-27 10:25:43 +01:00
|
|
|
Route::get('/userdata', 'UserController@getUserData');
|
2017-04-11 11:28:58 +02:00
|
|
|
Route::patch('/userdata', 'UserController@changeUserData')->middleware('csrf');
|
2016-10-10 12:26:55 +02:00
|
|
|
|
2016-10-10 10:57:39 +02:00
|
|
|
Route::get('/search-tmdb', 'TMDBController@search');
|
2017-03-06 09:40:58 +01:00
|
|
|
|
|
|
|
Route::post('/fetch-files', 'FileParserController@call');
|
2017-04-18 09:23:55 +02:00
|
|
|
|
|
|
|
Route::get('/video/{type}/{id}', 'VideoController@serve');
|
2016-10-10 10:57:39 +02:00
|
|
|
});
|
|
|
|
});
|
2017-11-03 13:53:28 +01:00
|
|
|
|
|
|
|
Route::fallback('HomeController@app');
|