// ------------------------------------------------------------------------------------------ // 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 dateType. * @apiParam {String} fromDate Torrents which have been uploaded the last x dateType. * @apiParam {String} dateType Which type of date (d for days, m for months, y for years). * @apiParam {String} minSize Filter by minimal size in sizeType. * @apiParam {String} maxSize Filter by maximal size in sizeType. * @apiParam {String} sizeType Which type of size (b for bytes, k for kilobytes, m for megabytes, g for gigabytes). * @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 */