From cc918ac3f45e32f031cce7b6e0473e5c2c34b8ae Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Apr 2018 16:15:39 +0200 Subject: Update video-channel routes (again) Use /video-channels now, it's more simple for clients --- support/doc/api/html/index.html | 953 ++++++++++++++++------------------------ support/doc/api/openapi.yaml | 69 +-- 2 files changed, 403 insertions(+), 619 deletions(-) (limited to 'support/doc') diff --git a/support/doc/api/html/index.html b/support/doc/api/html/index.html index 23162c307..d41fc3913 100644 --- a/support/doc/api/html/index.html +++ b/support/doc/api/html/index.html @@ -27,6 +27,9 @@
  • GET /accounts/{id}
  • +
  • + GET /accounts/{id}/videos +
  • GET /accounts
  • @@ -187,19 +190,22 @@ GET /video-channels
  • - GET /accounts/{accountId}/video-channels + POST /video-channels +
  • +
  • + GET /video-channels/{id}
  • - POST /accounts/{accountId}/video-channels + PUT /video-channels/{id}
  • - GET /account/{accountId}/video-channels/{id} + DELETE /video-channels/{id}
  • - PUT /account/{accountId}/video-channels/{id} + GET /video-channels/{id}/videos
  • - DELETE /account/{accountId}/video-channels/{id} + GET /accounts/{accountId}/video-channels
  • @@ -446,6 +452,117 @@ "updatedAt": "string" } } + + + + + + +
    + + +
    + Accounts + +
    + + +

    + + GET + /accounts/{id}/videos + +

    +
    +
    +
    +
    +
    +
    id
    + +
    in path
    +
    + string + +
    +
    +
    +

    The id of the account

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    200 OK
    +
    + + Video + +
    + +
    +
    +

    successful operation

    +
    +
    +
    +
    +
    +
    Response Content-Types: + application/json +
    +
    +
    Response Example + (200 OK) +
    +
    {
    +  "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",
    +  "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"
    +    }
    +  }
    +}
     
    @@ -1596,54 +1713,10 @@ "displayName": "string", "description": "string", "isLocal": "boolean", - "owner": { - "name": "string", + "ownerAccount": { + "id": "number", "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", - "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" - } - } - } - ] + } } ] } @@ -1848,54 +1921,10 @@ "displayName": "string", "description": "string", "isLocal": "boolean", - "owner": { - "name": "string", + "ownerAccount": { + "id": "number", "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", - "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" - } - } - } - ] + } } ] } @@ -2125,54 +2154,10 @@ "displayName": "string", "description": "string", "isLocal": "boolean", - "owner": { - "name": "string", + "ownerAccount": { + "id": "number", "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", - "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" - } - } - } - ] + } } ] } @@ -4867,54 +4852,10 @@ "displayName": "string", "description": "string", "isLocal": "boolean", - "owner": { - "name": "string", + "ownerAccount": { + "id": "number", "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", - "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" - } - } - } - ] + } } ] @@ -4923,7 +4864,7 @@
    -
    +
    @@ -4934,201 +4875,50 @@

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

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

    The account id

    +
    + +

    undefined

    +
    -
    +
    +
    +
    Request Content-Types: + application/json +
    +
    Request Example
    +
    {
    +  "name": "string",
    +  "description": "string"
    +}
    +
    + +
    +
    -
    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",
    -        "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 - -
    - - -

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

    -
    -
    -
    -
    -
    - -
    -
    - -

    undefined

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

    The account id

    -
    -
    -
    -
    -
    -
    -
    Request Content-Types: - application/json -
    -
    Request Example
    -
    {
    -  "name": "string",
    -  "description": "string"
    -}
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    204 No Content
    +
    204 No Content

    successful operation

    @@ -5165,7 +4955,7 @@
    -
    +
    @@ -5177,26 +4967,12 @@

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

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

    The account id

    -
    -
    id
    @@ -5246,54 +5022,10 @@ "displayName": "string", "description": "string", "isLocal": "boolean", - "owner": { - "name": "string", + "ownerAccount": { + "id": "number", "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", - "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" - } - } - } - ] + } } @@ -5301,7 +5033,7 @@
    -
    +
    @@ -5313,7 +5045,7 @@

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

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

    The account id

    -
    -
    id
    @@ -5422,7 +5140,7 @@
    -
    +
    @@ -5434,26 +5152,12 @@

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

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

    The account id

    -
    -
    id
    @@ -5514,6 +5218,208 @@
    +
    + + +
    + VideoChannel + +
    + + +

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

    +
    +
    +
    +
    +
    +
    id
    + +
    in path
    +
    + string + +
    +
    +
    +

    The video channel id

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    200 OK
    +
    + + Video + +
    + +
    +
    +

    successful operation

    +
    +
    +
    +
    +
    +
    Response Content-Types: + application/json +
    +
    +
    Response Example + (200 OK) +
    +
    {
    +  "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",
    +  "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",
    +    "ownerAccount": {
    +      "id": "number",
    +      "uuid": "string"
    +    }
    +  }
    +]
    +
    + +
    +
    +
    +

    VideoComment

    @@ -6760,20 +6666,11 @@ boolean -
    - owner: +
    + ownerAccount: object
    -
    - videos: - - - Video - - - -
    @@ -6784,54 +6681,10 @@ "displayName": "string", "description": "string", "isLocal": "boolean", - "owner": { - "name": "string", + "ownerAccount": { + "id": "number", "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", - "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" - } - } - } - ] + } } @@ -7394,54 +7247,10 @@ "displayName": "string", "description": "string", "isLocal": "boolean", - "owner": { - "name": "string", + "ownerAccount": { + "id": "number", "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", - "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" - } - } - } - ] + } } ] } diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index 56941031b..46b73145a 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml @@ -1017,27 +1017,6 @@ 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: [ ] @@ -1048,11 +1027,6 @@ paths: produces: - application/json parameters: - - name: accountId - in: path - required: true - type: string - description: 'The account id ' - in: body name: body schema: @@ -1060,7 +1034,7 @@ paths: responses: '204': description: successful operation - "/account/{accountId}/video-channels/{id}": + "/video-channels/{id}": get: tags: - VideoChannel @@ -1069,11 +1043,6 @@ paths: produces: - application/json parameters: - - name: accountId - in: path - required: true - type: string - description: 'The account id ' - name: id in: path required: true @@ -1094,11 +1063,6 @@ paths: produces: - application/json parameters: - - name: accountId - in: path - required: true - type: string - description: 'The account id ' - name: id in: path required: true @@ -1121,20 +1085,34 @@ paths: produces: - application/json parameters: - - name: accountId + - name: id in: path required: true type: string - description: 'The account id ' + description: 'The video channel id ' + responses: + '204': + description: successful operation + "/video-channels/{id}/videos": + get: + tags: + - VideoChannel + consumes: + - application/json + produces: + - application/json + parameters: - name: id in: path required: true type: string description: 'The video channel id ' responses: - '204': + '200': description: successful operation - "/account/{accountId}/video-channels/{id}/videos": + schema: + $ref: '#/definitions/Video' + /accounts/{accountId}/video-channels: get: tags: - VideoChannel @@ -1148,16 +1126,13 @@ paths: required: true type: string description: 'The account id ' - - name: id - in: path - required: true - type: string - description: 'The video channel id ' responses: '200': description: successful operation schema: - $ref: '#/definitions/Video' + type: array + items: + $ref: '#/definitions/VideoChannel' "/videos/{videoId}/comment-threads": get: tags: -- cgit v1.2.3