Upgrade api doc

This commit is contained in:
Chocobozzz 2018-04-06 10:17:06 +02:00
parent f37bad639b
commit 61b66b361f
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 919 additions and 61 deletions

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -141,7 +141,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -172,7 +172,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -212,6 +212,7 @@ paths:
- in: body - in: body
name: body name: body
required: true required: true
description: 'User to create'
schema: schema:
$ref: '#/definitions/AddUser' $ref: '#/definitions/AddUser'
responses: responses:
@ -236,7 +237,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -387,7 +388,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -453,7 +454,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -544,7 +545,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -562,7 +563,7 @@ paths:
tags: tags:
- Video - Video
consumes: consumes:
- application/json - multipart/form-data
produces: produces:
- application/json - application/json
parameters: parameters:
@ -570,7 +571,56 @@ paths:
in: path in: path
required: true required: true
type: string type: string
description: 'The video id ' description: 'The video id'
- name: thumbnailfile
in: formData
type: file
description: 'Video thumbnail file'
- name: previewfile
in: formData
type: file
description: 'Video preview file'
- name: category
in: formData
type: number
description: 'Video category'
- name: licence
in: formData
type: number
description: 'Video licence'
- name: language
in: formData
type: number
description: 'Video language'
- name: description
in: formData
type: string
description: 'Video description'
- name: support
in: formData
type: string
description: 'Text describing how to support the video uploader'
- name: nsfw
in: formData
type: boolean
description: 'Whether or not this video contains sensitive content'
- name: name
in: formData
type: string
description: 'Video name'
- name: tags
in: formData
type: string[]
description: 'Video tags'
- name: commentsEnabled
in: formData
type: boolean
description: 'Enable or disable comments for this video'
- name: privacy
in: formData
type: string
enum: [Public, Unlisted, Private]
description: 'Video privacy'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -655,10 +705,70 @@ paths:
produces: produces:
- application/json - application/json
parameters: parameters:
- in: formData - name: videofile
name: videofile in: formData
type: file type: file
description: The file to upload. required: true
description: 'Video file'
- name: thumbnailfile
in: formData
type: file
required: true
description: 'Video thumbnail file'
- name: previewfile
in: formData
type: file
required: true
description: 'Video preview file'
- name: category
in: formData
type: number
description: 'Video category'
- name: licence
in: formData
type: number
description: 'Video licence'
- name: language
in: formData
type: number
description: 'Video language'
- name: description
in: formData
type: string
description: 'Video description'
- name: support
in: formData
type: string
description: 'Text describing how to support the video uploader'
- name: channelId
in: formData
required: true
type: number
description: 'Channel id that will contain this video'
- name: nsfw
in: formData
required: true
type: boolean
description: 'Whether or not this video contains sensitive content'
- name: name
in: formData
required: true
type: string
description: 'Video name'
- name: tags
in: formData
type: string[]
description: 'Video tags'
- name: commentsEnabled
in: formData
type: boolean
description: 'Enable or disable comments for this video'
- name: privacy
in: formData
required: true
type: string
enum: [Public, Unlisted, Private]
description: 'Video privacy'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -682,7 +792,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -763,7 +873,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -794,7 +904,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -921,7 +1031,7 @@ paths:
in: query in: query
required: false required: false
type: number type: number
description: 'stoping page' description: 'stopping page'
- name: sort - name: sort
in: query in: query
required: false required: false
@ -1043,6 +1153,9 @@ definitions:
type: number type: number
label: label:
type: string type: string
VideoPrivacy:
type: string
enum: [Public, Unlisted, Private]
Video: Video:
properties: properties:
id: id:
@ -1051,6 +1164,8 @@ definitions:
type: string type: string
createdAt: createdAt:
type: string type: string
publishedAt:
type: string
updatedAt: updatedAt:
type: string type: string
category: category:
@ -1059,6 +1174,8 @@ definitions:
$ref: "#/definitions/VideoConstant" $ref: "#/definitions/VideoConstant"
language: language:
$ref: "#/definitions/VideoConstant" $ref: "#/definitions/VideoConstant"
privacy:
$ref: "#/definitions/VideoPrivacy"
description: description:
type: string type: string
duration: duration:
@ -1082,12 +1199,18 @@ definitions:
nsfw: nsfw:
type: boolean type: boolean
account: account:
name: string type: object
displayName: string properties:
url: string name:
host: string type: string
avatar: displayName:
$ref: "#/definitions/Avatar" type: string
url:
type: string
host:
type: string
avatar:
$ref: "#/definitions/Avatar"
VideoAbuse: VideoAbuse:
properties: properties:
id: id:
@ -1097,10 +1220,16 @@ definitions:
reporterAccount: reporterAccount:
$ref: "#/definitions/Account" $ref: "#/definitions/Account"
video: video:
id: number type: object
name: string properties:
uuid: string id:
url: string type: number
name:
type: string
uuid:
type: string
url:
type: string
createdAt: createdAt:
type: string type: string
VideoBlacklist: VideoBlacklist:
@ -1314,7 +1443,7 @@ definitions:
updatedAt: updatedAt:
type: string type: string
#Api responses # Api responses
AddUserResponse: AddUserResponse:
properties: properties:
id: id:
@ -1323,10 +1452,13 @@ definitions:
type: string type: string
VideoUploadResponse: VideoUploadResponse:
properties: properties:
id: video:
type: number type: object
uuid: properties:
type: string id:
type: number
uuid:
type: string
CommentThreadResponse: CommentThreadResponse:
properties: properties:
total: total:
@ -1340,7 +1472,7 @@ definitions:
comment: comment:
$ref: "#/definitions/VideoComment" $ref: "#/definitions/VideoComment"
#request bodies # Request bodies
AddUser: AddUser:
properties: properties:
username: username: