Updated public API

This commit is contained in:
Tzahi12345
2020-04-10 15:24:26 -04:00
parent 6849bd00d5
commit 18dab72b51

View File

@@ -1,17 +1,16 @@
openapi: 3.0.0
info:
title: Version 1
version: "1.0"
version: '1.0'
servers:
- url: http://localhost:17442
- url: 'http://localhost:17442'
paths:
/api/tomp3:
post:
tags:
- downloader
summary: Download audio file
description: Downloads an audio file with the given URL. Will include global
args if they exist.
description: Downloads an audio file with the given URL. Will include global args if they exist.
operationId: post-tomp3
requestBody:
content:
@@ -19,7 +18,7 @@ paths:
schema:
$ref: '#/components/schemas/body'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -30,8 +29,7 @@ paths:
tags:
- downloader
summary: Download video file
description: Downloads a video file with the given URL. Will include global
args if they exist.
description: Downloads a video file with the given URL. Will include global args if they exist.
operationId: post-tomp4
requestBody:
content:
@@ -39,7 +37,7 @@ paths:
schema:
$ref: '#/components/schemas/body_1'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -53,7 +51,7 @@ paths:
description: Gets all mp3 files and audio playlists stored in the db
operationId: get-getMp3s
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -67,7 +65,7 @@ paths:
description: Gets all mp4 files and video playlists stored in the db
operationId: get-getMp4s
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -78,8 +76,7 @@ paths:
tags:
- files
summary: Get file database object
description: Gets a file db object by its uid and type. Type will be found if
not provided
description: Gets a file db object by its uid and type. Type will be found if not provided
operationId: post-getFile
requestBody:
content:
@@ -87,7 +84,7 @@ paths:
schema:
$ref: '#/components/schemas/body_2'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -107,7 +104,7 @@ paths:
schema:
$ref: '#/components/schemas/body_3'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -127,7 +124,7 @@ paths:
schema:
$ref: '#/components/schemas/body_4'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -138,8 +135,7 @@ paths:
tags:
- subscriptions
summary: Subscribe to channel or playlist
description: Allows you to subscribe to channels and playlists. Name is optional
(will use the channel/playlist name)
description: Allows you to subscribe to channels and playlists. Name is optional (will use the channel/playlist name)
operationId: post-api-subscribe
requestBody:
content:
@@ -147,7 +143,7 @@ paths:
schema:
$ref: '#/components/schemas/body_5'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -166,7 +162,7 @@ paths:
schema:
$ref: '#/components/schemas/body_6'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -185,13 +181,13 @@ paths:
schema:
$ref: '#/components/schemas/body_7'
responses:
"200":
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/inline_response_200_8'
"500":
'500':
description: Internal Server Error
/api/getSubscription:
post:
@@ -206,7 +202,7 @@ paths:
schema:
$ref: '#/components/schemas/body_8'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -217,8 +213,7 @@ paths:
tags:
- subscriptions
summary: Download videos for subscription
description: Manually check the subscription for new videos. When used on newly
created subscriptions, it will grab all possible videos
description: 'Manually check the subscription for new videos. When used on newly created subscriptions, it will grab all possible videos'
operationId: post-api-downloadVideosForSubscription
requestBody:
content:
@@ -226,7 +221,7 @@ paths:
schema:
$ref: '#/components/schemas/body_9'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -244,7 +239,7 @@ paths:
schema:
type: object
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -263,7 +258,7 @@ paths:
schema:
$ref: '#/components/schemas/body_10'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -282,7 +277,7 @@ paths:
schema:
$ref: '#/components/schemas/body_11'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -301,7 +296,7 @@ paths:
schema:
$ref: '#/components/schemas/body_12'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -320,7 +315,7 @@ paths:
schema:
$ref: '#/components/schemas/body_13'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -329,7 +324,7 @@ paths:
/api/deleteMp4:
post:
tags:
- playlists
- files
summary: Delete mp4 file
description: Deletes an mp4 file by its uid
operationId: post-api-deleteMp4
@@ -339,7 +334,7 @@ paths:
schema:
$ref: '#/components/schemas/body_14'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -362,8 +357,8 @@ paths:
schema:
$ref: '#/components/schemas/body_15'
responses:
"200":
description: The file itself is in the response, as well as an options object.
'200':
description: 'The file itself is in the response, as well as an options object.'
/api/deleteFile:
post:
tags:
@@ -376,7 +371,7 @@ paths:
schema:
$ref: '#/components/schemas/body_16'
responses:
"200":
'200':
description: OK
/api/downloadArchive:
post:
@@ -391,7 +386,7 @@ paths:
schema:
$ref: '#/components/schemas/body_17'
responses:
"200":
'200':
description: The archive text file is sent as a response
/api/updaterStatus:
get:
@@ -401,7 +396,7 @@ paths:
description: Gets the status of an update that is in progress
operationId: get-api-updaterStatus
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -412,8 +407,7 @@ paths:
tags:
- updating
summary: Update server
description: Updates the server. If no tag is provided, the latest version will
be used.
description: 'Updates the server. If no tag is provided, the latest version will be used.'
operationId: post-api-updateServer
requestBody:
content:
@@ -421,7 +415,7 @@ paths:
schema:
$ref: '#/components/schemas/body_18'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -435,7 +429,7 @@ paths:
description: Checks if the pin is set for settings
operationId: post-api-isPinSet
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -446,8 +440,7 @@ paths:
tags:
- security
summary: Check if pin is correct
description: Checks the pin against an inputted one. Will return true if they
match
description: Checks the pin against an inputted one. Will return true if they match
operationId: post-api-checkPin
requestBody:
content:
@@ -455,7 +448,7 @@ paths:
schema:
$ref: '#/components/schemas/body_19'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -473,7 +466,7 @@ paths:
schema:
$ref: '#/components/schemas/body_20'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -487,7 +480,7 @@ paths:
description: Generates and sets a new API key
operationId: post-genapikey
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -506,7 +499,7 @@ paths:
schema:
$ref: '#/components/schemas/body_21'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -517,10 +510,10 @@ paths:
get:
tags: []
summary: Get config
description: Gets the config file stored in 'default.json'
description: "Gets the config file stored in 'default.json'"
operationId: get-config
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -529,7 +522,7 @@ paths:
/api/setConfig:
post:
summary: Set config
description: Sets the 'default.json' config file to the 'new_config_file' object
description: "Sets the 'default.json' config file to the 'new_config_file' object"
operationId: post-api-setConfig
requestBody:
content:
@@ -537,7 +530,7 @@ paths:
schema:
$ref: '#/components/schemas/body_22'
responses:
"200":
'200':
description: OK
content:
application/json:
@@ -554,10 +547,10 @@ components:
type: string
customQualityConfiguration:
type: string
example: "251"
example: '251'
maxBitrate:
type: string
example: "160"
example: '160'
customArgs:
type: string
customOutput:
@@ -590,7 +583,7 @@ components:
example: 242+251
selectedHeight:
type: string
example: "1080"
example: '1080'
customArgs:
type: string
customOutput:
@@ -788,8 +781,7 @@ components:
$ref: '#/components/schemas/apideleteSubscriptionFile_sub'
deleteForever:
type: boolean
description: If true, does not remove id from archive. Only valid if youtube-dl
archive is enabled in settings.
description: 'If true, does not remove id from archive. Only valid if youtube-dl archive is enabled in settings.'
inline_response_200_8:
type: object
properties: