Add video import in open api

This commit is contained in:
Chocobozzz 2019-07-29 14:33:16 +02:00
parent 094ff8e692
commit 1f82e3e885
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 82 additions and 26 deletions

View File

@ -96,6 +96,7 @@ x-tagGroups:
tags: tags:
- Accounts - Accounts
- User - User
- My User
- name: Videos - name: Videos
tags: tags:
- Video - Video
@ -489,6 +490,20 @@ paths:
schema: schema:
$ref: '#/components/schemas/UpdateUser' $ref: '#/components/schemas/UpdateUser'
required: true required: true
/users/register:
post:
summary: Register a user
tags:
- User
responses:
'204':
$ref: '#/paths/~1users~1me/put/responses/204'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterUser'
required: true
/users/me: /users/me:
get: get:
summary: Get current user information summary: Get current user information
@ -496,7 +511,7 @@ paths:
- OAuth2: - OAuth2:
- user - user
tags: tags:
- User - My User
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -512,7 +527,7 @@ paths:
- OAuth2: - OAuth2:
- user - user
tags: tags:
- User - My User
responses: responses:
'204': '204':
description: Successful operation description: Successful operation
@ -522,6 +537,25 @@ paths:
schema: schema:
$ref: '#/components/schemas/UpdateMe' $ref: '#/components/schemas/UpdateMe'
required: true required: true
/users/me/videos/imports:
get:
summary: Get video imports of current user
security:
- OAuth2:
- user
tags:
- My User
parameters:
- $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/sort'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/VideoImport'
/users/me/video-quota-used: /users/me/video-quota-used:
get: get:
summary: Get current user used quota summary: Get current user used quota
@ -529,7 +563,7 @@ paths:
- OAuth2: - OAuth2:
- user - user
tags: tags:
- User - My User
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -543,7 +577,7 @@ paths:
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
- User - My User
parameters: parameters:
- name: videoId - name: videoId
in: path in: path
@ -565,7 +599,7 @@ paths:
- OAuth2: - OAuth2:
- user - user
tags: tags:
- User - My User
parameters: parameters:
- $ref: '#/components/parameters/start' - $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count' - $ref: '#/components/parameters/count'
@ -584,7 +618,7 @@ paths:
- OAuth2: - OAuth2:
- user - user
tags: tags:
- User - My User
parameters: parameters:
- $ref: '#/components/parameters/start' - $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count' - $ref: '#/components/parameters/count'
@ -598,7 +632,7 @@ paths:
- OAuth2: - OAuth2:
- user - user
tags: tags:
- User - My User
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -609,7 +643,7 @@ paths:
- OAuth2: - OAuth2:
- user - user
tags: tags:
- User - My User
parameters: parameters:
- $ref: '#/components/parameters/subscriptionsUris' - $ref: '#/components/parameters/subscriptionsUris'
responses: responses:
@ -626,7 +660,7 @@ paths:
- OAuth2: - OAuth2:
- user - user
tags: tags:
- User - My User
parameters: parameters:
- $ref: '#/components/parameters/start' - $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count' - $ref: '#/components/parameters/count'
@ -645,7 +679,7 @@ paths:
- OAuth2: - OAuth2:
- user - user
tags: tags:
- User - My User
parameters: parameters:
- $ref: '#/components/parameters/subscriptionHandle' - $ref: '#/components/parameters/subscriptionHandle'
responses: responses:
@ -661,33 +695,19 @@ paths:
- OAuth2: - OAuth2:
- user - user
tags: tags:
- User - My User
parameters: parameters:
- $ref: '#/components/parameters/subscriptionHandle' - $ref: '#/components/parameters/subscriptionHandle'
responses: responses:
'200': '200':
description: successful operation description: successful operation
/users/register:
post:
summary: Register a user
tags:
- User
responses:
'204':
$ref: '#/paths/~1users~1me/put/responses/204'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterUser'
required: true
/users/me/avatar/pick: /users/me/avatar/pick:
post: post:
summary: Update current user avatar summary: Update current user avatar
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
- User - My User
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -2045,6 +2065,42 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/VideoStreamingPlaylists' $ref: '#/components/schemas/VideoStreamingPlaylists'
VideoImportStateConstant:
properties:
id:
type: integer
enum:
- 1
- 2
- 3
description: 'The video import state (Pending = 1, Success = 2, Failed = 3)'
label:
type: string
VideoImport:
properties:
id:
type: number
targetUrl:
type: string
magnetUri:
type: string
torrentName:
type: string
state:
type: object
properties:
id:
$ref: '#/components/schemas/VideoImportStateConstant'
label:
type: string
error:
type: string
createdAt:
type: string
updatedAt:
type: string
video:
$ref: '#/components/schemas/Video'
VideoAbuse: VideoAbuse:
properties: properties:
id: id: