From 5d00a3d7aa4309f1da5ac7d6e3ed63181eb34952 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 19 Mar 2018 12:36:41 +0100 Subject: Update the api documentation --- support/doc/api/html/index.html | 443 ++++++++++++++++++++++++---------------- support/doc/api/openapi.yaml | 40 ++-- 2 files changed, 292 insertions(+), 191 deletions(-) (limited to 'support/doc/api') diff --git a/support/doc/api/html/index.html b/support/doc/api/html/index.html index ae4020def..7e8adb2df 100644 --- a/support/doc/api/html/index.html +++ b/support/doc/api/html/index.html @@ -223,6 +223,7 @@
Schema Definitions
+ VideoConstant Video VideoAbuse VideoBlacklist @@ -1429,20 +1430,24 @@ { "id": "number", "uuid": "string", - "accountName": "string", "createdAt": "string", "updatedAt": "string", - "categoryLabel": "string", - "category": "number", - "licenceLabel": "string", - "licence": "number", - "languageLabel": "string", - "language": "number", + "category": { + "id": "number", + "label": "string" + }, + "licence": { + "id": "number", + "label": "string" + }, + "language": { + "id": "number", + "label": "string" + }, "description": "string", "duration": "number", "isLocal": "boolean", "name": "string", - "serverHost": "string", "thumbnailPath": "string", "previewPath": "string", "embedPath": "string", @@ -1632,20 +1637,24 @@ { "id": "number", "uuid": "string", - "accountName": "string", "createdAt": "string", "updatedAt": "string", - "categoryLabel": "string", - "category": "number", - "licenceLabel": "string", - "licence": "number", - "languageLabel": "string", - "language": "number", + "category": { + "id": "number", + "label": "string" + }, + "licence": { + "id": "number", + "label": "string" + }, + "language": { + "id": "number", + "label": "string" + }, "description": "string", "duration": "number", "isLocal": "boolean", "name": "string", - "serverHost": "string", "thumbnailPath": "string", "previewPath": "string", "embedPath": "string", @@ -1842,20 +1851,24 @@ { "id": "number", "uuid": "string", - "accountName": "string", "createdAt": "string", "updatedAt": "string", - "categoryLabel": "string", - "category": "number", - "licenceLabel": "string", - "licence": "number", - "languageLabel": "string", - "language": "number", + "category": { + "id": "number", + "label": "string" + }, + "licence": { + "id": "number", + "label": "string" + }, + "language": { + "id": "number", + "label": "string" + }, "description": "string", "duration": "number", "isLocal": "boolean", "name": "string", - "serverHost": "string", "thumbnailPath": "string", "previewPath": "string", "embedPath": "string", @@ -2183,20 +2196,24 @@ { "id": "number", "uuid": "string", - "accountName": "string", "createdAt": "string", "updatedAt": "string", - "categoryLabel": "string", - "category": "number", - "licenceLabel": "string", - "licence": "number", - "languageLabel": "string", - "language": "number", + "category": { + "id": "number", + "label": "string" + }, + "licence": { + "id": "number", + "label": "string" + }, + "language": { + "id": "number", + "label": "string" + }, "description": "string", "duration": "number", "isLocal": "boolean", "name": "string", - "serverHost": "string", "thumbnailPath": "string", "previewPath": "string", "embedPath": "string", @@ -2471,20 +2488,24 @@ { "id": "number", "uuid": "string", - "accountName": "string", "createdAt": "string", "updatedAt": "string", - "categoryLabel": "string", - "category": "number", - "licenceLabel": "string", - "licence": "number", - "languageLabel": "string", - "language": "number", + "category": { + "id": "number", + "label": "string" + }, + "licence": { + "id": "number", + "label": "string" + }, + "language": { + "id": "number", + "label": "string" + }, "description": "string", "duration": "number", "isLocal": "boolean", "name": "string", - "serverHost": "string", "thumbnailPath": "string", "previewPath": "string", "embedPath": "string", @@ -2814,20 +2835,24 @@ { "id": "number", "uuid": "string", - "accountName": "string", "createdAt": "string", "updatedAt": "string", - "categoryLabel": "string", - "category": "number", - "licenceLabel": "string", - "licence": "number", - "languageLabel": "string", - "language": "number", + "category": { + "id": "number", + "label": "string" + }, + "licence": { + "id": "number", + "label": "string" + }, + "language": { + "id": "number", + "label": "string" + }, "description": "string", "duration": "number", "isLocal": "boolean", "name": "string", - "serverHost": "string", "thumbnailPath": "string", "previewPath": "string", "embedPath": "string", @@ -2915,20 +2940,24 @@
{
   "id": "number",
   "uuid": "string",
-  "accountName": "string",
   "createdAt": "string",
   "updatedAt": "string",
-  "categoryLabel": "string",
-  "category": "number",
-  "licenceLabel": "string",
-  "licence": "number",
-  "languageLabel": "string",
-  "language": "number",
+  "category": {
+    "id": "number",
+    "label": "string"
+  },
+  "licence": {
+    "id": "number",
+    "label": "string"
+  },
+  "language": {
+    "id": "number",
+    "label": "string"
+  },
   "description": "string",
   "duration": "number",
   "isLocal": "boolean",
   "name": "string",
-  "serverHost": "string",
   "thumbnailPath": "string",
   "previewPath": "string",
   "embedPath": "string",
@@ -3015,20 +3044,24 @@
                   
{
   "id": "number",
   "uuid": "string",
-  "accountName": "string",
   "createdAt": "string",
   "updatedAt": "string",
-  "categoryLabel": "string",
-  "category": "number",
-  "licenceLabel": "string",
-  "licence": "number",
-  "languageLabel": "string",
-  "language": "number",
+  "category": {
+    "id": "number",
+    "label": "string"
+  },
+  "licence": {
+    "id": "number",
+    "label": "string"
+  },
+  "language": {
+    "id": "number",
+    "label": "string"
+  },
   "description": "string",
   "duration": "number",
   "isLocal": "boolean",
   "name": "string",
-  "serverHost": "string",
   "thumbnailPath": "string",
   "previewPath": "string",
   "embedPath": "string",
@@ -3428,11 +3461,23 @@
   {
     "id": "number",
     "reason": "string",
-    "reporterUsername": "string",
-    "reporterServerHost": "string",
-    "videoId": "number",
-    "videoUUID": "string",
-    "videoName": "string",
+    "reporterAccount": {
+      "displayName": "string",
+      "id": "number",
+      "uuid": "string",
+      "url": "string",
+      "name": "string",
+      "host": "string",
+      "followingCount": "number",
+      "followersCount": "number",
+      "createdAt": "string",
+      "updatedAt": "string",
+      "avatar": {
+        "path": "string",
+        "createdAt": "string",
+        "updatedAt": "string"
+      }
+    },
     "createdAt": "string"
   }
 ]
@@ -3877,20 +3922,24 @@
       {
         "id": "number",
         "uuid": "string",
-        "accountName": "string",
         "createdAt": "string",
         "updatedAt": "string",
-        "categoryLabel": "string",
-        "category": "number",
-        "licenceLabel": "string",
-        "licence": "number",
-        "languageLabel": "string",
-        "language": "number",
+        "category": {
+          "id": "number",
+          "label": "string"
+        },
+        "licence": {
+          "id": "number",
+          "label": "string"
+        },
+        "language": {
+          "id": "number",
+          "label": "string"
+        },
         "description": "string",
         "duration": "number",
         "isLocal": "boolean",
         "name": "string",
-        "serverHost": "string",
         "thumbnailPath": "string",
         "previewPath": "string",
         "embedPath": "string",
@@ -4057,20 +4106,24 @@
     {
       "id": "number",
       "uuid": "string",
-      "accountName": "string",
       "createdAt": "string",
       "updatedAt": "string",
-      "categoryLabel": "string",
-      "category": "number",
-      "licenceLabel": "string",
-      "licence": "number",
-      "languageLabel": "string",
-      "language": "number",
+      "category": {
+        "id": "number",
+        "label": "string"
+      },
+      "licence": {
+        "id": "number",
+        "label": "string"
+      },
+      "language": {
+        "id": "number",
+        "label": "string"
+      },
       "description": "string",
       "duration": "number",
       "isLocal": "boolean",
       "name": "string",
-      "serverHost": "string",
       "thumbnailPath": "string",
       "previewPath": "string",
       "embedPath": "string",
@@ -4321,20 +4374,24 @@
       {
         "id": "number",
         "uuid": "string",
-        "accountName": "string",
         "createdAt": "string",
         "updatedAt": "string",
-        "categoryLabel": "string",
-        "category": "number",
-        "licenceLabel": "string",
-        "licence": "number",
-        "languageLabel": "string",
-        "language": "number",
+        "category": {
+          "id": "number",
+          "label": "string"
+        },
+        "licence": {
+          "id": "number",
+          "label": "string"
+        },
+        "language": {
+          "id": "number",
+          "label": "string"
+        },
         "description": "string",
         "duration": "number",
         "isLocal": "boolean",
         "name": "string",
-        "serverHost": "string",
         "thumbnailPath": "string",
         "previewPath": "string",
         "embedPath": "string",
@@ -5082,6 +5139,45 @@
             
           
           

Schema Definitions

+
+

+ VideoConstant: + +

+
+
+
+
+
+ id: + number + +
+
+ label: + string + +
+
+
+
+
+
+
Example
+
{
+  "id": "number",
+  "label": "string"
+}
+
+ +
+
+
+

Video: @@ -5105,11 +5201,6 @@ string -
- accountName: - string - -
createdAt: string @@ -5120,34 +5211,31 @@ string
-
- categoryLabel: - string - -
category: - number - -
-
- licenceLabel: - string + + + VideoConstant + +
licence: - number - -
-
- languageLabel: - string + + + VideoConstant + +
language: - number + + + VideoConstant + +
@@ -5170,11 +5258,6 @@ string
-
- serverHost: - string - -
thumbnailPath: string @@ -5210,6 +5293,11 @@ boolean
+
+ account: + object + +

@@ -5219,20 +5307,24 @@
{
   "id": "number",
   "uuid": "string",
-  "accountName": "string",
   "createdAt": "string",
   "updatedAt": "string",
-  "categoryLabel": "string",
-  "category": "number",
-  "licenceLabel": "string",
-  "licence": "number",
-  "languageLabel": "string",
-  "language": "number",
+  "category": {
+    "id": "number",
+    "label": "string"
+  },
+  "licence": {
+    "id": "number",
+    "label": "string"
+  },
+  "language": {
+    "id": "number",
+    "label": "string"
+  },
   "description": "string",
   "duration": "number",
   "isLocal": "boolean",
   "name": "string",
-  "serverHost": "string",
   "thumbnailPath": "string",
   "previewPath": "string",
   "embedPath": "string",
@@ -5270,29 +5362,18 @@
                       string
                       
                     
-                    
- reporterUsername: - string - -
-
- reporterServerHost: - string - -
-
- videoId: - number - -
-
- videoUUID: - string +
+ reporterAccount: + + + Account + +
-
- videoName: - string +
+ video: + object
@@ -5309,11 +5390,23 @@
{
   "id": "number",
   "reason": "string",
-  "reporterUsername": "string",
-  "reporterServerHost": "string",
-  "videoId": "number",
-  "videoUUID": "string",
-  "videoName": "string",
+  "reporterAccount": {
+    "displayName": "string",
+    "id": "number",
+    "uuid": "string",
+    "url": "string",
+    "name": "string",
+    "host": "string",
+    "followingCount": "number",
+    "followersCount": "number",
+    "createdAt": "string",
+    "updatedAt": "string",
+    "avatar": {
+      "path": "string",
+      "createdAt": "string",
+      "updatedAt": "string"
+    }
+  },
   "createdAt": "string"
 }
 
@@ -5481,20 +5574,24 @@ { "id": "number", "uuid": "string", - "accountName": "string", "createdAt": "string", "updatedAt": "string", - "categoryLabel": "string", - "category": "number", - "licenceLabel": "string", - "licence": "number", - "languageLabel": "string", - "language": "number", + "category": { + "id": "number", + "label": "string" + }, + "licence": { + "id": "number", + "label": "string" + }, + "language": { + "id": "number", + "label": "string" + }, "description": "string", "duration": "number", "isLocal": "boolean", "name": "string", - "serverHost": "string", "thumbnailPath": "string", "previewPath": "string", "embedPath": "string", @@ -6074,20 +6171,24 @@ { "id": "number", "uuid": "string", - "accountName": "string", "createdAt": "string", "updatedAt": "string", - "categoryLabel": "string", - "category": "number", - "licenceLabel": "string", - "licence": "number", - "languageLabel": "string", - "language": "number", + "category": { + "id": "number", + "label": "string" + }, + "licence": { + "id": "number", + "label": "string" + }, + "language": { + "id": "number", + "label": "string" + }, "description": "string", "duration": "number", "isLocal": "boolean", "name": "string", - "serverHost": "string", "thumbnailPath": "string", "previewPath": "string", "embedPath": "string", diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 99bf0fd2d..634da66e8 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml @@ -69,7 +69,7 @@ paths: '200': description: successful operation schema: - $ref: '#/definitions/ServerConfig' + $ref: '#/definitions/ServerConfig' /jobs: get: tags: @@ -105,7 +105,7 @@ paths: schema: type: array items: - $ref: '#/definitions/Job' + $ref: '#/definitions/Job' '/server/following/{host}': delete: tags: @@ -1037,6 +1037,12 @@ paths: '204': description: successful operation definitions: + VideoConstant: + properties: + id: + type: number + label: + type: string Video: properties: id: @@ -1047,18 +1053,12 @@ definitions: type: string updatedAt: type: string - categoryLabel: - type: string category: - type: number - licenceLabel: - type: string + $ref: "#/definitions/VideoConstant" licence: - type: number - languageLabel: - type: string + $ref: "#/definitions/VideoConstant" language: - type: number + $ref: "#/definitions/VideoConstant" description: type: string duration: @@ -1139,14 +1139,14 @@ definitions: type: boolean owner: type: object - properties: - name: + properties: + name: type: string - uuid: + uuid: type: string videos: type: array - items: + items: $ref: "#/definitions/Video" VideoComment: properties: @@ -1228,7 +1228,7 @@ definitions: type: boolean role: type: string - enum: [User, Moderator, Administrator] + enum: [User, Moderator, Administrator] videoQuota: type: number createdAt: @@ -1241,7 +1241,7 @@ definitions: $ref: "#/definitions/VideoChannel" ServerConfig: properties: - signup: + signup: type: object properties: allowed: @@ -1264,7 +1264,7 @@ definitions: properties: max: type: number - extensions: + extensions: type: array items: type: string @@ -1273,8 +1273,8 @@ definitions: properties: file: type: object - properties: - extensions: + properties: + extensions: type: array items: type: string -- cgit v1.2.3