From cb38c1e04a6451e066b1680de5ea92cc789fa685 Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Mon, 11 Dec 2017 23:21:08 +0100 Subject: [PATCH] Add list API documentation --- res/template/apidoc.html | 2 + res/template/fragments/api/list-get.html | 80 ++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 res/template/fragments/api/list-get.html diff --git a/res/template/apidoc.html b/res/template/apidoc.html index 8ccdbc9..cf8147a 100644 --- a/res/template/apidoc.html +++ b/res/template/apidoc.html @@ -55,6 +55,8 @@

List Methods

{{template "api-list-post"}} + {{template "api-list-get"}} + {{template "footer"}} {{template "analytics"}} diff --git a/res/template/fragments/api/list-get.html b/res/template/fragments/api/list-get.html new file mode 100644 index 0000000..def896a --- /dev/null +++ b/res/template/fragments/api/list-get.html @@ -0,0 +1,80 @@ +{{define "api-list-get"}} +
+ GET/list/{id} +
+

Description

+

+ Returns information about a file list and the files in it. +

+

Parameters

+ + + + + + + + + + + + + +
ParamRequiredLocationDescription
idtrueURLID of the list
+

Returns

+

+ The API will return some basic information about every file. + Every file also has a "detail_href" field which contains a URL + to the info API of the file. Follow that link to get more + information about the file like size, checksum, mime type, etc. + The address is relative to the API URL and should be appended to + the end. +

+
HTTP 200: OK
+{
+	{
+		"success": true,
+		"id": "L8bhwx",
+		"title": "Rust in Peace",
+		"date_created": 1513033315,
+		"files": [
+			{
+				"detail_href": "/file/_SqVWi/info",
+				"id": "_SqVWi",
+				"file_name": "01 Holy Wars... The Punishment Due.mp3",
+				"description": "",
+				"date_created": 1513033304,
+				"date_last_view": 1513033304,
+				"list_description": ""
+			},
+			{
+				"detail_href": "/file/RKwgZb/info",
+				"id": "RKwgZb",
+				"file_name": "02 Hangar 18.mp3",
+				"description": "",
+				"date_created": 1513033304,
+				"date_last_view": 1513033304,
+				"list_description": ""
+			},
+			{
+				"detail_href": "/file/DRaL_e/info",
+				"id": "DRaL_e",
+				"file_name": "03 Take No Prisoners.mp3",
+				"description": "",
+				"date_created": 1513033304,
+				"date_last_view": 1513033304,
+				"list_description": ""
+			}
+		]
+	}
+}
+
+
HTTP 404: Not Found
+{
+	"success": false,
+	"value": "list_not_found",
+}
+
+
+
+{{end}} \ No newline at end of file