[ { "type": "get", "url": "/search/", "title": "Search Torrents", "version": "1.1.1", "name": "FindTorrents", "group": "Torrents", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String[]", "optional": false, "field": "c", "description": "

In which categories to search.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "q", "description": "

Query to search (torrent name).

" }, { "group": "Parameter", "type": "Number", "optional": false, "field": "page", "description": "

Page of the search results.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "limit", "description": "

Number of results per page.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "userID", "description": "

Uploader ID owning the torrents.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "fromID", "description": "

Show results with torrents ID superior to this.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "s", "description": "

Torrent status.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "maxage", "description": "

Torrents which have been uploaded the last x days.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "toDate", "description": "

Torrents which have been uploaded since x dateType.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "fromDate", "description": "

Torrents which have been uploaded the last x dateType.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "dateType", "description": "

Which type of date (d for days, m for months, y for years).

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "minSize", "description": "

Filter by minimal size in sizeType.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "maxSize", "description": "

Filter by maximal size in sizeType.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "sizeType", "description": "

Which type of size (b for bytes, k for kilobytes, m for megabytes, g for gigabytes).

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "sort", "description": "

Torrent sorting type (0 = id, 1 = name, 2 = date, 3 = downloads, 4 = size, 5 = seeders, 6 = leechers, 7 = completed).

" }, { "group": "Parameter", "type": "Boolean", "optional": false, "field": "order", "description": "

Order ascending or descending (true = ascending).

" }, { "group": "Parameter", "type": "String[]", "optional": false, "field": "lang", "description": "

Filter the languages.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "torrents", "description": "

List of torrent object (see view for the properties).

" } ] }, "examples": [ { "title": "Success-Response:", "content": " HTTP/1.1 200 OK\n {\n\t\t\t\"torrents\": [...],\n\t\t\t\"queryRecordCount\": 50,\n\t\t\t\"totalRecordCount\": 798414\n\t\t}", "type": "json" } ] }, "filename": "controllers/api/api.go", "groupTitle": "Torrents", "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String[]", "optional": false, "field": "errors", "description": "

List of errors messages with a 404 error message in it.

" } ] }, "examples": [ { "title": "Error-Response:", "content": "HTTP/1.1 404 Not Found\n{\n \"errors\": [ \"404_not_found\", ... ]\n}", "type": "json" } ] } }, { "type": "get", "url": "/search/", "title": "Search Torrents", "version": "1.0.0", "name": "FindTorrents", "group": "Torrents", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String[]", "optional": false, "field": "c", "description": "

In which categories to search.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "q", "description": "

Query to search (torrent name).

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "limit", "description": "

Number of results per page.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "userID", "description": "

Uploader ID owning the torrents.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "fromID", "description": "

Show results with torrents ID superior to this.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "s", "description": "

Torrent status.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "maxage", "description": "

Torrents which have been uploaded the last x days.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "toDate", "description": "

Torrents which have been uploaded since x dateType.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "fromDate", "description": "

Torrents which have been uploaded the last x dateType.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "dateType", "description": "

Which type of date (d for days, m for months, y for years).

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "minSize", "description": "

Filter by minimal size in sizeType.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "maxSize", "description": "

Filter by maximal size in sizeType.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "sizeType", "description": "

Which type of size (b for bytes, k for kilobytes, m for megabytes, g for gigabytes).

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "sort", "description": "

Torrent sorting type (0 = id, 1 = name, 2 = date, 3 = downloads, 4 = size, 5 = seeders, 6 = leechers, 7 = completed).

" }, { "group": "Parameter", "type": "Boolean", "optional": false, "field": "order", "description": "

Order ascending or descending (true = ascending).

" }, { "group": "Parameter", "type": "String[]", "optional": false, "field": "lang", "description": "

Filter the languages.

" }, { "group": "Parameter", "type": "Number", "optional": false, "field": "page", "description": "

Search page.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "torrents", "description": "

List of torrent object (see view for the properties).

" } ] }, "examples": [ { "title": "Success-Response:", "content": " HTTP/1.1 200 OK\n {\n\t\t\t[...]\n\t\t}", "type": "json" } ] }, "filename": "controllers/api/_apidoc.js", "groupTitle": "Torrents", "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String[]", "optional": false, "field": "errors", "description": "

List of errors messages with a 404 error message in it.

" } ] }, "examples": [ { "title": "Error-Response:", "content": "HTTP/1.1 404 Not Found\n{\n \"errors\": [ \"404_not_found\", ... ]\n}", "type": "json" } ] } }, { "type": "get", "url": "/view/:id", "title": "Request Torrent information", "version": "1.1.1", "name": "GetTorrent", "group": "Torrents", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Torrent unique ID.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Number", "optional": false, "field": "id", "description": "

ID of the torrent.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "name", "description": "

Name of the torrent.

" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "status", "description": "

Status of the torrent.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "hash", "description": "

Hash of the torrent.

" }, { "group": "Success 200", "type": "Date", "optional": false, "field": "date", "description": "

Uploaded date of the torrent.

" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "filesize", "description": "

File size in Bytes of the torrent.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "description", "description": "

Description of the torrent.

" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "comments", "description": "

Comments of the torrent.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "sub_category", "description": "

Sub Category of the torrent.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "category", "description": "

Category of the torrent.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "anidb_id", "description": "

Anidb ID of the torrent.

" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "uploader_id", "description": "

ID of the torrent uploader.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "uploader_name", "description": "

Username of the torrent uploader.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "uploader_old", "description": "

Old username from nyaa of the torrent uploader.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "website_link", "description": "

External Link of the torrent.

" }, { "group": "Success 200", "type": "String[]", "optional": false, "field": "languages", "description": "

Languages of the torrent.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "magnet", "description": "

Magnet URI of the torrent.

" }, { "group": "Success 200", "type": "String", "optional": false, "field": "torrent", "description": "

Download URL of the torrent.

" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "seeders", "description": "

Number of seeders of the torrent.

" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "leechers", "description": "

Number of leechers of the torrent.

" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "completed", "description": "

Downloads completed of the torrent.

" }, { "group": "Success 200", "type": "Date", "optional": false, "field": "last_scrape", "description": "

Last statistics update of the torrent.

" }, { "group": "Success 200", "type": "Object[]", "optional": false, "field": "file_list", "description": "

List of files in the torrent.

" } ] }, "examples": [ { "title": "Success-Response:", "content": " HTTP/1.1 200 OK\n\t{\n\t\"id\": 952801,\n\t\"name\": \"[HorribleSubs] Uchouten Kazoku S2 [720p]\",\n\t\"status\": 1,\n\t\"hash\": \"6E4D96F7A0B0456672E80B150CCB7C15868CD47D\",\n\t\"date\": \"2017-07-05T11:01:39Z\",\n\t\"filesize\": 4056160259,\n\t\"description\": \"

Unofficial batch

\\n\",\n\t\"comments\": [],\n\t\"sub_category\": \"5\",\n\t\"category\": \"3\",\n\t\"anidb_id\": \"\",\n\t\"downloads\": 0,\n\t\"uploader_id\": 7177,\n\t\"uploader_name\": \"DarAR92\",\n\t\"uploader_old\": \"\",\n\t\"website_link\": \"http://horriblesubs.info/\",\n\t\"languages\": [\n\t\"en-us\"\n\t],\n\t\"magnet\": \"magnet:?xt=urn:btih:6E4D96F7A0B0456672E80B150CCB7C15868CD47D&dn=%5BHorribleSubs%5D+Uchouten+Kazoku+S2+%5B720p%5D&tr=http://nyaa.tracker.wf:7777/announce&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://tracker.doko.moe:6969&tr=http://tracker.anirena.com:80/announce&tr=http://anidex.moe:6969/announce&tr=udp://tracker.opentrackr.org:1337&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://zer0day.ch:1337&tr=udp://9.rarbg.com:2710/announce&tr=udp://tracker2.christianbro.pw:6969/announce&tr=udp://tracker.coppersurfer.tk:6969&tr=udp://tracker.leechers-paradise.org:6969&tr=udp://eddie4.nl:6969/announce&tr=udp://tracker.doko.moe:6969/announce\",\n\t\"torrent\": \"https://nyaa.pantsu.cat/download/6E4D96F7A0B0456672E80B150CCB7C15868CD47D\",\n\t\"seeders\": 4,\n\t\"leechers\": 2,\n\t\"completed\": 28,\n\t\"last_scrape\": \"2017-07-07T07:48:32.509635Z\",\n\t\"file_list\": [\n\t{\n\t\"path\": \"[HorribleSubs] Uchouten Kazoku S2 - 01[720p].mkv\",\n\t\"filesize\": 338250895\n\t},\n\t{\n\t\"path\": \"[HorribleSubs] Uchouten Kazoku S2 - 12 [720p].mkv\",\n\t\"filesize\": 338556275\n\t}\n\t]\n\t}", "type": "json" } ] }, "filename": "controllers/api/api.go", "groupTitle": "Torrents", "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String[]", "optional": false, "field": "errors", "description": "

List of errors messages with a 404 error message in it.

" } ] }, "examples": [ { "title": "Error-Response:", "content": "HTTP/1.1 404 Not Found\n{\n \"errors\": [ \"404_not_found\", ... ]\n}", "type": "json" } ] } }, { "type": "get", "url": "/head/:id", "title": "Request Torrent Head", "version": "1.1.1", "name": "GetTorrentHead", "group": "Torrents", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Torrent unique ID.

" } ] } }, "success": { "examples": [ { "title": "Success-Response:", "content": "HTTP/1.1 200 OK", "type": "json" } ] }, "filename": "controllers/api/api.go", "groupTitle": "Torrents", "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String[]", "optional": false, "field": "errors", "description": "

List of errors messages with a 404 error message in it.

" } ] }, "examples": [ { "title": "Error-Response:", "content": "HTTP/1.1 404 Not Found\n{\n \"errors\": [ \"404_not_found\", ... ]\n}", "type": "json" } ] } }, { "type": "get", "url": "/", "title": "Request Torrents index", "version": "1.1.1", "name": "GetTorrents", "group": "Torrents", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Torrent unique ID.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Object[]", "optional": false, "field": "torrents", "description": "

List of torrent object (see view for the properties).

" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "queryRecordCount", "description": "

Number of torrents given.

" }, { "group": "Success 200", "type": "Number", "optional": false, "field": "totalRecordCount", "description": "

Total number of torrents.

" } ] }, "examples": [ { "title": "Success-Response:", "content": " HTTP/1.1 200 OK\n {\n\t\t\t\"torrents\": [...],\n\t\t\t\"queryRecordCount\": 50,\n\t\t\t\"totalRecordCount\": 798414\n\t\t}", "type": "json" } ] }, "filename": "controllers/api/api.go", "groupTitle": "Torrents", "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "String[]", "optional": false, "field": "errors", "description": "

List of errors messages with a 404 error message in it.

" } ] }, "examples": [ { "title": "Error-Response:", "content": "HTTP/1.1 404 Not Found\n{\n \"errors\": [ \"404_not_found\", ... ]\n}", "type": "json" } ] } }, { "type": "put", "url": "/update/", "title": "Update a Torrent", "version": "1.1.1", "name": "UpdateTorrent", "group": "Torrents", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "username", "description": "

Torrent uploader name.

" }, { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

Torrent ID.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "name", "description": "

Torrent name.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "category", "description": "

Torrent category.

" }, { "group": "Parameter", "type": "Boolean", "optional": false, "field": "remake", "description": "

Torrent is a remake.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "description", "description": "

Torrent description.

" }, { "group": "Parameter", "type": "Number", "optional": false, "field": "status", "description": "

Torrent status.

" }, { "group": "Parameter", "type": "Boolean", "optional": false, "field": "hidden", "description": "

Torrent hidden.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "website_link", "description": "

Torrent website link.

" }, { "group": "Parameter", "type": "String[]", "optional": false, "field": "languages", "description": "

Torrent languages.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Boolean", "optional": false, "field": "ok", "description": "

The request is done without failing

" }, { "group": "Success 200", "type": "String[]", "optional": false, "field": "infos", "description": "

Messages information relative to the request

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

The resulting torrent updated (see view for the properties)

" } ] }, "examples": [ { "title": "Success-Response:", "content": "HTTP/1.1 200 OK", "type": "json" } ] }, "filename": "controllers/api/api.go", "groupTitle": "Torrents", "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "Boolean", "optional": false, "field": "ok", "description": "

The request couldn't be done due to some errors.

" }, { "group": "Error 4xx", "type": "String[]", "optional": false, "field": "errors", "description": "

List of errors messages.

" }, { "group": "Error 4xx", "type": "Object[]", "optional": false, "field": "all_errors", "description": "

List of errors object messages for each wrong field

" } ] }, "examples": [ { "title": "Error-Response:", "content": " HTTP/1.1 200 OK\n {\n \"ok\": false,\n \"errors\": [ ... ]\n \"all_errors\": {\n\t\t \t\"username\": [ ... ],\n }\n }", "type": "json" } ] } }, { "type": "post", "url": "/upload", "title": "Upload a Torrent", "version": "1.1.1", "name": "UploadTorrent", "group": "Torrents", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "username", "description": "

Torrent uploader name.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "name", "description": "

Torrent name.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "magnet", "description": "

Torrent magnet URI.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "category", "description": "

Torrent category.

" }, { "group": "Parameter", "type": "Boolean", "optional": false, "field": "remake", "description": "

Torrent is a remake.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "description", "description": "

Torrent description.

" }, { "group": "Parameter", "type": "Number", "optional": false, "field": "status", "description": "

Torrent status.

" }, { "group": "Parameter", "type": "Boolean", "optional": false, "field": "hidden", "description": "

Torrent hidden.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "website_link", "description": "

Torrent website link.

" }, { "group": "Parameter", "type": "String[]", "optional": false, "field": "languages", "description": "

Torrent languages.

" }, { "group": "Parameter", "type": "File", "optional": false, "field": "torrent", "description": "

Torrent file to upload (you have to send a torrent file or a magnet, not both!).

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Boolean", "optional": false, "field": "ok", "description": "

The request is done without failing

" }, { "group": "Success 200", "type": "String[]", "optional": false, "field": "infos", "description": "

Messages information relative to the request

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

The resulting torrent uploaded (see view for the properties)

" } ] }, "examples": [ { "title": "Success-Response:", "content": "HTTP/1.1 200 OK", "type": "json" } ] }, "filename": "controllers/api/api.go", "groupTitle": "Torrents", "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "Boolean", "optional": false, "field": "ok", "description": "

The request couldn't be done due to some errors.

" }, { "group": "Error 4xx", "type": "String[]", "optional": false, "field": "errors", "description": "

List of errors messages.

" }, { "group": "Error 4xx", "type": "Object[]", "optional": false, "field": "all_errors", "description": "

List of errors object messages for each wrong field

" } ] }, "examples": [ { "title": "Error-Response:", "content": " HTTP/1.1 200 OK\n {\n \"ok\": false,\n \"errors\": [ ... ]\n \"all_errors\": {\n\t\t \t\"username\": [ ... ],\n }\n }", "type": "json" } ] } }, { "type": "post", "url": "/login/", "title": "Login a user", "version": "1.1.1", "name": "Login", "group": "Users", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "username", "description": "

Username or Email.

" }, { "group": "Parameter", "type": "String", "optional": false, "field": "password", "description": "

Password.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Boolean", "optional": false, "field": "ok", "description": "

The request is done without failing

" }, { "group": "Success 200", "type": "String[]", "optional": false, "field": "infos", "description": "

Messages information relative to the request

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

The connected user object

" } ] }, "examples": [ { "title": "Success-Response:", "content": " HTTP/1.1 200 OK\n\t\t{\n\t\t\tdata:\n \t\t[{\n\t\t\t\t\tuser_id:1,\n\t\t\t\t\tusername:\"username\",\n\t\t\t\t\tstatus:1,\n\t\t\t\t\ttoken:\"token\",\n\t\t\t\t\tmd5:\"\",\n\t\t\t\t\tcreated_at:\"date\",\n\t\t\t\t\tliking_count:0,\n\t\t\t\t\tliked_count:0\n\t\t\t\t}],\n\t\t\tinfos: [\"Logged\", ... ],\n\t\t\tok:true\n\t\t}", "type": "json" } ] }, "filename": "controllers/api/api.go", "groupTitle": "Users", "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "Boolean", "optional": false, "field": "ok", "description": "

The request couldn't be done due to some errors.

" }, { "group": "Error 4xx", "type": "String[]", "optional": false, "field": "errors", "description": "

List of errors messages.

" }, { "group": "Error 4xx", "type": "Object[]", "optional": false, "field": "all_errors", "description": "

List of errors object messages for each wrong field

" } ] }, "examples": [ { "title": "Error-Response:", "content": " HTTP/1.1 200 OK\n {\n \"ok\": false,\n \"errors\": [ ... ]\n \"all_errors\": {\n\t\t \t\"username\": [ ... ],\n }\n }", "type": "json" } ] } }, { "type": "post", "url": "/user/", "title": "Get a private user profile", "version": "1.1.1", "name": "Private_Profile", "group": "Users", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "String", "optional": false, "field": "access_token", "description": "

Token sent by the OAuth API

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Boolean", "optional": false, "field": "ok", "description": "

The request is done without failing

" }, { "group": "Success 200", "type": "String[]", "optional": false, "field": "infos", "description": "

Messages information relative to the request

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

The connected user object

" } ] }, "examples": [ { "title": "Success-Response:", "content": " HTTP/1.1 200 OK\n\t\t{\n\t\t\tdata:\n \t\t[{\n\t\t\t\t\tuser_id:1,\n\t\t\t\t\tusername:\"username\",\n\t\t\t\t\tstatus:1,\n\t\t\t\t\ttoken:\"token\",\n\t\t\t\t\tmd5:\"\",\n\t\t\t\t\tcreated_at:\"date\",\n\t\t\t\t\tliking_count:0,\n\t\t\t\t\tliked_count:0\n\t\t\t\t}],\n\t\t\tinfos: [\"Logged\", ... ],\n\t\t\tok:true\n\t\t}", "type": "json" } ] }, "filename": "controllers/api/api.go", "groupTitle": "Users", "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "Boolean", "optional": false, "field": "ok", "description": "

The request couldn't be done due to some errors.

" }, { "group": "Error 4xx", "type": "String[]", "optional": false, "field": "errors", "description": "

List of errors messages.

" }, { "group": "Error 4xx", "type": "Object[]", "optional": false, "field": "all_errors", "description": "

List of errors object messages for each wrong field

" } ] }, "examples": [ { "title": "Error-Response:", "content": " HTTP/1.1 200 OK\n {\n \"ok\": false,\n \"errors\": [ ... ]\n \"all_errors\": {\n\t\t \t\"username\": [ ... ],\n }\n }", "type": "json" } ] } }, { "type": "get", "url": "/profile/", "title": "Get a user profile", "version": "1.1.1", "name": "Profile", "group": "Users", "parameter": { "fields": { "Parameter": [ { "group": "Parameter", "type": "Number", "optional": false, "field": "id", "description": "

User ID.

" } ] } }, "success": { "fields": { "Success 200": [ { "group": "Success 200", "type": "Boolean", "optional": false, "field": "ok", "description": "

The request is done without failing

" }, { "group": "Success 200", "type": "String[]", "optional": false, "field": "infos", "description": "

Messages information relative to the request

" }, { "group": "Success 200", "type": "Object", "optional": false, "field": "data", "description": "

The user object

" } ] }, "examples": [ { "title": "Success-Response:", "content": " HTTP/1.1 200 OK\n\t\t{\n\t\t\tdata:\n \t\t[{\n\t\t\t\t\tuser_id:1,\n\t\t\t\t\tusername:\"username\",\n\t\t\t\t\tstatus:1,\n\t\t\t\t\tmd5:\"\",\n\t\t\t\t\tcreated_at:\"date\",\n\t\t\t\t\tliking_count:0,\n\t\t\t\t\tliked_count:0\n\t\t\t\t}],\n\t\t\tinfos: [\"Logged\", ... ],\n\t\t\tok:true\n\t\t}", "type": "json" } ] }, "filename": "controllers/api/api.go", "groupTitle": "Users", "error": { "fields": { "Error 4xx": [ { "group": "Error 4xx", "type": "Boolean", "optional": false, "field": "ok", "description": "

The request couldn't be done due to some errors.

" }, { "group": "Error 4xx", "type": "String[]", "optional": false, "field": "errors", "description": "

List of errors messages.

" }, { "group": "Error 4xx", "type": "Object[]", "optional": false, "field": "all_errors", "description": "

List of errors object messages for each wrong field

" } ] }, "examples": [ { "title": "Error-Response:", "content": " HTTP/1.1 200 OK\n {\n \"ok\": false,\n \"errors\": [ ... ]\n \"all_errors\": {\n\t\t \t\"username\": [ ... ],\n }\n }", "type": "json" } ] } } ]