From 48dce1c90dff4e90a4bcffefaecf157336cf904b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 Apr 2018 17:05:32 +0200 Subject: Update video channel routes --- support/doc/api/html/index.html | 543 +++++++++++++++++++++++++++------------- support/doc/api/openapi.yaml | 72 ++++-- 2 files changed, 415 insertions(+), 200 deletions(-) (limited to 'support') diff --git a/support/doc/api/html/index.html b/support/doc/api/html/index.html index bf9430e79..23162c307 100644 --- a/support/doc/api/html/index.html +++ b/support/doc/api/html/index.html @@ -40,6 +40,14 @@ +
+ Feeds + +
Job
@@ -224,7 +232,8 @@
Schema Definitions
- VideoConstant + VideoConstantNumber + VideoConstantString VideoPrivacy Video VideoAbuse @@ -605,6 +614,95 @@ +

Feeds

+
+ + +
+ Feeds + +
+ + +

+ + GET + /feeds/videos.{format} + +

+
+
+
+
+
+
format
+ +
in path
+
+ string + + xml, + atom, + json + + + xml +
+
+
+

The format expected (xml defaults to RSS 2.0, atom to ATOM 1.0 and json to JSON FEED 1.0

+
+
+
+
+
accountId
+
in query
+
+ number + +
+
+
+

The id of the local account to filter to (beware, users IDs and not actors IDs which will return empty feeds

+
+
+
+
+
accountName
+
in query
+
+ string + +
+
+
+

The name of the local account to filter to

+
+
+
+
+
+
+
+
+
+
+
+
200 OK
+
+
+

successful operation

+
+
+
+
+
+
Response Content-Types: + application/atom+xml, application/rss+xml, application/json +
+
+
+

Job

@@ -1518,7 +1616,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -1770,7 +1868,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -2047,7 +2145,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -2488,7 +2586,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -2825,7 +2923,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -3206,7 +3304,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -3329,7 +3427,7 @@
language
in formData
- number + string
@@ -3478,7 +3576,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -3611,7 +3709,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -3942,7 +4040,7 @@
language
in formData
- number + string
@@ -4665,7 +4763,7 @@

VideoChannel

-
+
@@ -4677,7 +4775,7 @@

GET - /videos/channels + /video-channels

@@ -4789,9 +4887,144 @@ "label": "string" }, "language": { + "id": "string", + "label": "string" + }, + "privacy": "string", + "description": "string", + "duration": "number", + "isLocal": "boolean", + "name": "string", + "thumbnailPath": "string", + "previewPath": "string", + "embedPath": "string", + "views": "number", + "likes": "number", + "dislikes": "number", + "nsfw": "boolean", + "account": { + "name": "string", + "displayName": "string", + "url": "string", + "host": "string", + "avatar": { + "path": "string", + "createdAt": "string", + "updatedAt": "string" + } + } + } + ] + } +] + + + +
+
+
+
+ + +
+ VideoChannel + +
+ + +

+ + GET + /accounts/{accountId}/video-channels + +

+
+
+
+
+
+
accountId
+ +
in path
+
+ string + +
+
+
+

The account id

+
+
+
+
+
+
+
+
+
+
+
+
200 OK
+
+ + VideoChannel + +
+ +
+
+

successful operation

+
+
+
+
type
+
+ + + VideoChannel + + + +
+
+
+
+
+
Response Content-Types: + application/json +
+
+
Response Example + (200 OK) +
+
[
+  {
+    "displayName": "string",
+    "description": "string",
+    "isLocal": "boolean",
+    "owner": {
+      "name": "string",
+      "uuid": "string"
+    },
+    "videos": [
+      {
+        "id": "number",
+        "uuid": "string",
+        "createdAt": "string",
+        "publishedAt": "string",
+        "updatedAt": "string",
+        "category": {
           "id": "number",
           "label": "string"
         },
+        "licence": {
+          "id": "number",
+          "label": "string"
+        },
+        "language": {
+          "id": "string",
+          "label": "string"
+        },
         "privacy": "string",
         "description": "string",
         "duration": "number",
@@ -4825,7 +5058,7 @@
               
-
+
@@ -4837,7 +5070,7 @@

POST - /videos/channels + /accounts/{accountId}/video-channels

@@ -4858,6 +5091,22 @@
+
+
+
+
accountId
+ +
in path
+
+ string + +
+
+
+

The account id

+
+
+
@@ -4916,7 +5165,7 @@
-
+
@@ -4928,12 +5177,26 @@

GET - /videos/channels/{id} + /account/{accountId}/video-channels/{id}

+
+
+
accountId
+ +
in path
+
+ string + +
+
+
+

The account id

+
+
id
@@ -4945,7 +5208,7 @@
-

The video id

+

The video channel id

@@ -5003,7 +5266,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -5038,7 +5301,7 @@
-
+
@@ -5050,7 +5313,7 @@

PUT - /videos/channels/{id} + /account/{accountId}/video-channels/{id}

@@ -5072,6 +5335,20 @@
+
+
+
accountId
+ +
in path
+
+ string + +
+
+
+

The account id

+
+
id
@@ -5083,7 +5360,7 @@
-

The video id

+

The video channel id

@@ -5145,7 +5422,7 @@
-
+
@@ -5157,12 +5434,26 @@

DELETE - /videos/channels/{id} + /account/{accountId}/video-channels/{id}

+
+
+
accountId
+ +
in path
+
+ string + +
+
+
+

The account id

+
+
id
@@ -5174,7 +5465,7 @@
-

The video id

+

The video channel id

@@ -5223,141 +5514,6 @@
-
- - -
- VideoChannel - -
- - -

- - GET - /videos/accounts/{accountId}/channels - -

-
-
-
-
-
-
accountId
- -
in path
-
- string - -
-
-
-

The account id

-
-
-
-
-
-
-
-
-
-
-
-
200 OK
-
- - VideoChannel - -
- -
-
-

successful operation

-
-
-
-
type
-
- - - VideoChannel - - - -
-
-
-
-
-
Response Content-Types: - application/json -
-
-
Response Example - (200 OK) -
-
[
-  {
-    "displayName": "string",
-    "description": "string",
-    "isLocal": "boolean",
-    "owner": {
-      "name": "string",
-      "uuid": "string"
-    },
-    "videos": [
-      {
-        "id": "number",
-        "uuid": "string",
-        "createdAt": "string",
-        "publishedAt": "string",
-        "updatedAt": "string",
-        "category": {
-          "id": "number",
-          "label": "string"
-        },
-        "licence": {
-          "id": "number",
-          "label": "string"
-        },
-        "language": {
-          "id": "number",
-          "label": "string"
-        },
-        "privacy": "string",
-        "description": "string",
-        "duration": "number",
-        "isLocal": "boolean",
-        "name": "string",
-        "thumbnailPath": "string",
-        "previewPath": "string",
-        "embedPath": "string",
-        "views": "number",
-        "likes": "number",
-        "dislikes": "number",
-        "nsfw": "boolean",
-        "account": {
-          "name": "string",
-          "displayName": "string",
-          "url": "string",
-          "host": "string",
-          "avatar": {
-            "path": "string",
-            "createdAt": "string",
-            "updatedAt": "string"
-          }
-        }
-      }
-    ]
-  }
-]
-
- -
-
-
-

VideoComment

@@ -6104,9 +6260,9 @@

Schema Definitions

-
+

- VideoConstant: + VideoConstantNumber: + +

+
+ +
+

+ VideoConstantString: + +

+
+
+
+
+
+ id: + string + +
+
+ label: + string + +
+
+
+
+
+
+
Example
+
{
+  "id": "string",
+  "label": "string"
+}
 
@@ -6210,7 +6405,7 @@ category: - VideoConstant + VideoConstantNumber @@ -6219,7 +6414,7 @@ licence: - VideoConstant + VideoConstantNumber @@ -6228,7 +6423,7 @@ language: - VideoConstant + VideoConstantString @@ -6323,7 +6518,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -6609,7 +6804,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", @@ -7219,7 +7414,7 @@ "label": "string" }, "language": { - "id": "number", + "id": "string", "label": "string" }, "privacy": "string", diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 10f60175d..4a1f06d00 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml @@ -91,7 +91,7 @@ paths: in: path required: true type: string - enum: ['xml', 'atom' 'json'] + enum: [ 'xml', 'atom', 'json'] default: 'xml' description: 'The format expected (xml defaults to RSS 2.0, atom to ATOM 1.0 and json to JSON FEED 1.0' - name: accountId @@ -967,7 +967,7 @@ paths: type: array items: $ref: '#/definitions/VideoBlacklist' - /videos/channels: + /video-channels: get: tags: - VideoChannel @@ -998,6 +998,27 @@ paths: type: array items: $ref: '#/definitions/VideoChannel' + /accounts/{accountId}/video-channels: + get: + tags: + - VideoChannel + consumes: + - application/json + produces: + - application/json + parameters: + - name: accountId + in: path + required: true + type: string + description: 'The account id ' + responses: + '200': + description: successful operation + schema: + type: array + items: + $ref: '#/definitions/VideoChannel' post: security: - OAuth2: [ ] @@ -1008,6 +1029,11 @@ paths: produces: - application/json parameters: + - name: accountId + in: path + required: true + type: string + description: 'The account id ' - in: body name: body schema: @@ -1015,7 +1041,7 @@ paths: responses: '204': description: successful operation - "/videos/channels/{id}": + "/account/{accountId}/video-channels/{id}": get: tags: - VideoChannel @@ -1024,11 +1050,16 @@ paths: produces: - application/json parameters: + - name: accountId + in: path + required: true + type: string + description: 'The account id ' - name: id in: path required: true type: string - description: 'The video id ' + description: 'The video channel id ' responses: '200': description: successful operation @@ -1044,11 +1075,16 @@ paths: produces: - application/json parameters: + - name: accountId + in: path + required: true + type: string + description: 'The account id ' - name: id in: path required: true type: string - description: 'The video id ' + description: 'The video channel id ' - in: body name: body schema: @@ -1066,35 +1102,19 @@ paths: produces: - application/json parameters: - - name: id + - name: accountId in: path required: true type: string - description: 'The video id ' - responses: - '204': - description: successful operation - /videos/accounts/{accountId}/channels: - get: - tags: - - VideoChannel - consumes: - - application/json - produces: - - application/json - parameters: - - name: accountId + description: 'The account id ' + - name: id in: path required: true type: string - description: 'The account id ' + description: 'The video channel id ' responses: - '200': + '204': description: successful operation - schema: - type: array - items: - $ref: '#/definitions/VideoChannel' "/videos/{videoId}/comment-threads": get: tags: -- cgit v1.2.3