diff --git a/Changelog b/Changelog index 018267b42..321472072 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-04-18 DariusIII + * Chg: Use api/v1 for api * Chg: Add CollectionRegexesController * Chg: Update routes * Chg: Add CategoryRegexesController diff --git a/resources/views/themes/shared/apidesc.tpl b/resources/views/themes/shared/apidesc.tpl index 56428d10b..96f92df26 100755 --- a/resources/views/themes/shared/apidesc.tpl +++ b/resources/views/themes/shared/apidesc.tpl @@ -4,22 +4,22 @@
{if $loggedin=="true"}

API Credentials

-

Your credentials should be provided as ?apikey={$userdata.rsstoken}

+

Your credentials should be provided as &apikey={$userdata.rsstoken}

{/if}

Available Functions

Use the parameter ?t= to specify the function being called.

-
Capabilities ?t=caps
+
Capabilities ?t=caps
Reports the capabilities if the server. Includes information about the server name, available search categories and version number of the newznab protocol being used.
Capabilities does not require any credentials in order to be ran.

-
Search ?t=search&q=linux
+
Search ?t=search&q=linux
Returns a list of nzbs matching a query. You can also filter by site category by including a comma separated list of categories as follows ?t=search&cat={$catClass::GAME_ROOT},{$catClass::MOVIE_ROOT}. Include &extended=1 to return extended information in the search results.

-
TV ?t=tvsearch&q=law and order&season=7&ep=12
+
TV ?t=tvsearch&q=law and order&season=7&ep=12
Returns a list of nzbs matching a query, category, tvrageid, season or episode. You can also filter by site category by including a comma separated list of categories as follows: - ?t=tvsearch&cat={$catClass::GAME_ROOT},{$catClass::MOVIE_ROOT}. + ?t=tvsearch&cat={$catClass::GAME_ROOT},{$catClass::MOVIE_ROOT}. Include &extended=1 to return extended information in the search results.
@@ -27,18 +27,18 @@ &rid=25056 (TVRage) &tvdbid=153021 (TVDB) &traktid=1393 (Trakt) &tvmazeid=73 (TVMaze) &imdbid=1520211 (IMDB) &tmdbid=1402 (TMDB).

-
Movies ?t=movie&imdbid=1418646
+
Movies ?t=movie&imdbid=1418646
Returns a list of nzbs matching a query, an imdbid and optionally a category. Filter by site category by including a comma separated list of categories as follows ?t=movie&imdbid=1418646&cat={$catClass::MOVIE_SD},{$catClass::MOVIE_HD}. Include &extended=1 to return extended information in the search results.
+ style="font-family:courier;">?t=movie&imdbid=1418646&cat={$catClass::MOVIE_SD},{$catClass::MOVIE_HD}. Include &extended=1 to return extended information in the search results.
-
Details ?t=details&id=9ca52909ba9b9e5e6758d815fef4ecda
+
Details ?t=details&id=9ca52909ba9b9e5e6758d815fef4ecda
Returns detailed information about an nzb.

-
Info ?t=info&id=9ca52909ba9b9e5e6758d815fef4ecda
+
Info ?t=info&id=9ca52909ba9b9e5e6758d815fef4ecda
Returns NFO contents for an NZB. Retrieve the NFO as file by specifying o=file in the request URI.

-
Get ?t=get&id=9ca52909ba9b9e5e6758d815fef4ecda
+
Get ?t=get&id=9ca52909ba9b9e5e6758d815fef4ecda
Downloads the nzb file associated with an Id.

diff --git a/routes/web.php b/routes/web.php index 1fd15f000..074fe1a15 100644 --- a/routes/web.php +++ b/routes/web.php @@ -49,8 +49,12 @@ Route::prefix('cart')->group(function () { Route::post('delete/{id}', 'CartController@destroy'); }); -Route::get('api', 'Api\ApiController@api')->middleware('api'); -Route::post('api', 'Api\ApiController@api')->middleware('api'); +Route::prefix('api/v1')->group(function () { + Route::namespace('Api')->group(function () { + Route::get('api', 'ApiController@api'); + Route::post('api', 'ApiController@api'); + }); +}); Route::get('details/{guid}', 'DetailsController@show'); Route::post('details/{guid}', 'DetailsController@show');