docs(api): update and correct API documentation (#1733) [skip ci]

pull/1771/head
TheCatLady 3 years ago committed by GitHub
parent 6a75a05c23
commit de56380c05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -52,9 +52,15 @@ components:
email: email:
type: string type: string
example: 'hey@itsme.com' example: 'hey@itsme.com'
readOnly: true
username:
type: string
plexToken: plexToken:
type: string type: string
readOnly: true readOnly: true
plexUsername:
type: string
readOnly: true
userType: userType:
type: integer type: integer
example: 1 example: 1
@ -77,13 +83,6 @@ components:
type: number type: number
example: 5 example: 5
readOnly: true readOnly: true
requests:
type: array
readOnly: true
items:
$ref: '#/components/schemas/MediaRequest'
settings:
$ref: '#/components/schemas/UserSettings'
required: required:
- id - id
- email - email
@ -92,11 +91,11 @@ components:
UserSettings: UserSettings:
type: object type: object
properties: properties:
discordId: locale:
type: string type: string
region: region:
type: string type: string
language: originalLanguage:
type: string type: string
MainSettings: MainSettings:
type: object type: object
@ -398,7 +397,6 @@ components:
activeLanguageProfileId: activeLanguageProfileId:
type: number type: number
example: 1 example: 1
nullable: true
activeAnimeProfileId: activeAnimeProfileId:
type: number type: number
nullable: true nullable: true
@ -408,6 +406,7 @@ components:
activeAnimeProfileName: activeAnimeProfileName:
type: string type: string
example: 720p/1080p example: 720p/1080p
nullable: true
activeAnimeDirectory: activeAnimeDirectory:
type: string type: string
nullable: true nullable: true
@ -953,7 +952,7 @@ components:
status: status:
type: number type: number
example: 0 example: 0
description: Status of the request. 1 = PENDING APPROVAL, 2 = APPROVED, 3 = DECLINED, 4 = AVAILABLE description: Status of the request. 1 = PENDING APPROVAL, 2 = APPROVED, 3 = DECLINED
readOnly: true readOnly: true
media: media:
$ref: '#/components/schemas/MediaInfo' $ref: '#/components/schemas/MediaInfo'
@ -1587,9 +1586,8 @@ components:
UserSettingsNotifications: UserSettingsNotifications:
type: object type: object
properties: properties:
notificationAgents: notificationTypes:
type: number $ref: '#/components/schemas/NotificationAgentTypes'
example: 0
emailEnabled: emailEnabled:
type: boolean type: boolean
pgpKey: pgpKey:
@ -1614,6 +1612,25 @@ components:
telegramSendSilently: telegramSendSilently:
type: boolean type: boolean
nullable: true nullable: true
NotificationAgentTypes:
type: object
properties:
discord:
type: number
email:
type: number
pushbullet:
type: number
pushover:
type: number
slack:
type: number
telegram:
type: number
webhook:
type: number
webpush:
type: number
securitySchemes: securitySchemes:
cookieAuth: cookieAuth:
type: apiKey type: apiKey
@ -1842,8 +1859,8 @@ paths:
$ref: '#/components/schemas/PlexLibrary' $ref: '#/components/schemas/PlexLibrary'
/settings/plex/devices/servers: /settings/plex/devices/servers:
get: get:
summary: Gets the user's available plex servers summary: Gets the user's available Plex servers
description: Returns a list of available plex servers and their connectivity state description: Returns a list of available Plex servers and their connectivity state
tags: tags:
- settings - settings
responses: responses:
@ -2980,7 +2997,15 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/User' type: object
properties:
email:
type: string
example: 'hey@itsme.com'
username:
type: string
permissions:
type: number
responses: responses:
'201': '201':
description: The created user description: The created user
@ -2991,7 +3016,7 @@ paths:
put: put:
summary: Update batch of users summary: Update batch of users
description: | description: |
Update users with given IDs with provided values in request `body.settings`. You cannot update users' plex tokens through this request. Update users with given IDs with provided values in request `body.settings`. You cannot update users' Plex tokens through this request.
Requires the `MANAGE_USERS` permission. Requires the `MANAGE_USERS` permission.
tags: tags:
@ -3018,7 +3043,6 @@ paths:
type: array type: array
items: items:
$ref: '#/components/schemas/User' $ref: '#/components/schemas/User'
/user/import-from-plex: /user/import-from-plex:
post: post:
summary: Import all users from Plex summary: Import all users from Plex
@ -3067,7 +3091,7 @@ paths:
get: get:
summary: Get user by ID summary: Get user by ID
description: | description: |
Retrieves user details in a JSON object.. Requires the `MANAGE_USERS` permission. Retrieves user details in a JSON object. Requires the `MANAGE_USERS` permission.
tags: tags:
- users - users
parameters: parameters:

Loading…
Cancel
Save