2017-07-20 20:55:28 +02:00
// ------------------------------------------------------------------------------------------
// General apiDoc documentation blocks and old history blocks.
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
// Current Success.
// ------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------
// Current Errors.
// ------------------------------------------------------------------------------------------
/ * *
* @ apiDefine NotFoundError
* @ apiVersion 1.0 . 0
* @ apiError { String [ ] } errors List of errors messages with a 404 error message in it .
*
* @ apiErrorExample Error - Response :
* HTTP / 1.1 404 Not Found
* {
* "errors" : [ "404_not_found" , ... ]
* }
* /
// ------------------------------------------------------------------------------------------
// History.
// ------------------------------------------------------------------------------------------
/ * *
* @ api { get } / search / Search Torrents
* @ apiVersion 1.0 . 0
* @ apiName FindTorrents
* @ apiGroup Torrents
*
* @ apiParam { String [ ] } c In which categories to search .
* @ apiParam { String } q Query to search ( torrent name ) .
* @ apiParam { String } limit Number of results per page .
* @ apiParam { String } userID Uploader ID owning the torrents .
* @ apiParam { String } fromID Show results with torrents ID superior to this .
* @ apiParam { String } s Torrent status .
* @ apiParam { String } maxage Torrents which have been uploaded the last x days .
* @ apiParam { String } toDate Torrents which have been uploaded since x < code > dateType < / c o d e > .
* @ apiParam { String } fromDate Torrents which have been uploaded the last x < code > dateType < / c o d e > .
* @ apiParam { String } dateType Which type of date ( < code > d < / c o d e > f o r d a y s , < c o d e > m < / c o d e > f o r m o n t h s , < c o d e > y < / c o d e > f o r y e a r s ) .
* @ apiParam { String } minSize Filter by minimal size in < code > sizeType < / c o d e > .
* @ apiParam { String } maxSize Filter by maximal size in < code > sizeType < / c o d e > .
* @ apiParam { String } sizeType Which type of size ( < code > b < / c o d e > f o r b y t e s , < c o d e > k < / c o d e > f o r k i l o b y t e s , < c o d e > m < / c o d e > f o r m e g a b y t e s , < c o d e > g < / c o d e > f o r g i g a b y t e s ) .
* @ apiParam { String } sort Torrent sorting type ( 0 = id , 1 = name , 2 = date , 3 = downloads , 4 = size , 5 = seeders , 6 = leechers , 7 = completed ) .
* @ apiParam { Boolean } order Order ascending or descending ( true = ascending ) .
* @ apiParam { String [ ] } lang Filter the languages .
* @ apiParam { Number } page Search page .
*
* @ apiSuccess { Object [ ] } torrents List of torrent object ( see view for the properties ) .
*
* @ apiSuccessExample Success - Response :
* HTTP / 1.1 200 OK
* {
* [ ... ]
* }
*
* @ apiUse NotFoundError
2017-07-23 07:46:29 +02:00
* /