Updated API docs to fix errors

pull/479/head
Isaac Abadi 4 years ago
parent cc75e94408
commit 609f749d6c

@ -3,6 +3,10 @@ info:
title: YoutubeDL-Material API Docs - Official title: YoutubeDL-Material API Docs - Official
version: '1.0' version: '1.0'
description: "Welcome to the official docs for YoutubeDL-Material.\n\n\nYou can check out all the available endpoints. Remember to authenticate with your API key using the \"apiKey\" query parameter with your requests.\n\n\nTo do so, simply add this to the end of your API call:\n\n\n`?apiKey=API_KEY`\n\n\nReplce API_KEY with the API key in the settings menu. If one doesn't exist, click generate to create one.\n\n### Multi-user mode\n\nWhen using multi-user mode, you will need to supply a JWT token to authenticate requests through that user. This lets the server know which user to run the task for, like downloading a video for a specific user. \n\nTo do this, you must use the `/api/auth/login` endpoint to login using a user's username and password. This will result in an object containing a `token`. Supply this along with your API key like so:\n\n`?apiKey=API_KEY&jwt=JWT_TOKEN`\n\nNotice the `&` between the `API_KEY` and `jwt`." description: "Welcome to the official docs for YoutubeDL-Material.\n\n\nYou can check out all the available endpoints. Remember to authenticate with your API key using the \"apiKey\" query parameter with your requests.\n\n\nTo do so, simply add this to the end of your API call:\n\n\n`?apiKey=API_KEY`\n\n\nReplce API_KEY with the API key in the settings menu. If one doesn't exist, click generate to create one.\n\n### Multi-user mode\n\nWhen using multi-user mode, you will need to supply a JWT token to authenticate requests through that user. This lets the server know which user to run the task for, like downloading a video for a specific user. \n\nTo do this, you must use the `/api/auth/login` endpoint to login using a user's username and password. This will result in an object containing a `token`. Supply this along with your API key like so:\n\n`?apiKey=API_KEY&jwt=JWT_TOKEN`\n\nNotice the `&` between the `API_KEY` and `jwt`."
contact:
name: Isaac Abadi
url: https://github.com/Tzahi12345/YoutubeDL-Material
email: IsaacMGrynsztein@gmail.com
servers: servers:
- url: 'http://localhost:17442' - url: 'http://localhost:17442'
paths: paths:
@ -825,21 +829,21 @@ paths:
- Auth query parameter: [] - Auth query parameter: []
tags: tags:
- multi-user mode - multi-user mode
/api/versionInfo: /api/versionInfo:
get: get:
tags: tags:
- server - server
summary: Gets server version info summary: Gets server version info
operationId: get-api-versionInfo operationId: get-api-versionInfo
responses: responses:
'200': '200':
description: OK description: OK
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VersionInfoResponse' $ref: '#/components/schemas/VersionInfoResponse'
security: security:
- Auth query parameter: [] - Auth query parameter: []
/api/getLogs: /api/getLogs:
post: post:
summary: Gets logs from server summary: Gets logs from server
@ -877,21 +881,21 @@ paths:
description: Clears the log file description: Clears the log file
security: security:
- Auth query parameter: [] - Auth query parameter: []
/api/getDBInfo: /api/getDBInfo:
get: get:
tags: tags:
- db - db
summary: Gets information on the DB summary: Gets information on the DB
operationId: get-api-getDBInfo operationId: get-api-getDBInfo
responses: responses:
'200': '200':
description: OK description: OK
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/DBInfoResponse' $ref: '#/components/schemas/DBInfoResponse'
security: security:
- Auth query parameter: [] - Auth query parameter: []
/api/transferDB: /api/transferDB:
post: post:
summary: Transfers DB between Local and MongoDB summary: Transfers DB between Local and MongoDB
@ -1192,7 +1196,6 @@ components:
properties: properties:
download: download:
$ref: '#/components/schemas/Download' $ref: '#/components/schemas/Download'
nullable: true
GenerateArgsResponse: GenerateArgsResponse:
type: object type: object
properties: properties:
@ -1212,7 +1215,6 @@ components:
properties: properties:
download: download:
$ref: '#/components/schemas/Download' $ref: '#/components/schemas/Download'
nullable: true
GetAllDownloadsRequest: GetAllDownloadsRequest:
type: object type: object
properties: properties:
@ -1617,7 +1619,6 @@ components:
description: User UID description: User UID
type: string type: string
sub: sub:
description: Subscription
$ref: '#/components/schemas/Subscription' $ref: '#/components/schemas/Subscription'
DownloadTwitchChatByVODIDResponse: DownloadTwitchChatByVODIDResponse:
required: required:
@ -1647,7 +1648,6 @@ components:
description: User UID description: User UID
type: string type: string
sub: sub:
description: Subscription
$ref: '#/components/schemas/Subscription' $ref: '#/components/schemas/Subscription'
CheckConcurrentStreamResponse: CheckConcurrentStreamResponse:
required: required:
@ -1922,7 +1922,6 @@ components:
- url - url
- type - type
- title - title
- type
- options - options
- uid - uid
- step_index - step_index

@ -5,5 +5,5 @@
import { Download } from './Download'; import { Download } from './Download';
export interface DownloadResponse { export interface DownloadResponse {
download?: Download | null; download?: Download;
} }

@ -19,8 +19,5 @@ export interface DownloadTwitchChatByVODIDRequest {
* User UID * User UID
*/ */
uuid?: string; uuid?: string;
/**
* Subscription
*/
sub?: Subscription; sub?: Subscription;
} }

@ -5,5 +5,5 @@
import { Download } from './Download'; import { Download } from './Download';
export interface GetDownloadResponse { export interface GetDownloadResponse {
download?: Download | null; download?: Download;
} }
Loading…
Cancel
Save