mirror of
https://github.com/TeamPiped/OpenAPI.git
synced 2024-08-14 23:56:55 +00:00
Add some validation and tagging.
This commit is contained in:
parent
0182192d90
commit
911b8ffb2a
1 changed files with 28 additions and 2 deletions
30
swagger.yaml
30
swagger.yaml
|
@ -13,10 +13,20 @@ info:
|
||||||
name: MIT
|
name: MIT
|
||||||
url: "https://opensource.org/licenses/MIT"
|
url: "https://opensource.org/licenses/MIT"
|
||||||
tags:
|
tags:
|
||||||
|
- name: video
|
||||||
|
description: Video related operations.
|
||||||
|
- name: channel
|
||||||
|
description: Channel related operations.
|
||||||
|
- name: playlist
|
||||||
|
description: Playlist related operations.
|
||||||
|
- name: search
|
||||||
|
description: Search related operations.
|
||||||
|
- name: feed
|
||||||
|
description: Feed related operations.
|
||||||
- name: unauthenticated
|
- name: unauthenticated
|
||||||
description: Requests that can be made by anyone
|
description: Requests that can be made by anyone, without any authentication.
|
||||||
- name: authenticated
|
- name: authenticated
|
||||||
description: Requests that can only be made when logged in, with an authToken
|
description: Requests that can only be made when logged in, with an authToken.
|
||||||
paths:
|
paths:
|
||||||
/trending:
|
/trending:
|
||||||
get:
|
get:
|
||||||
|
@ -51,6 +61,7 @@ paths:
|
||||||
/streams/{videoId}:
|
/streams/{videoId}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
- video
|
||||||
- unauthenticated
|
- unauthenticated
|
||||||
summary: Gets Video Information
|
summary: Gets Video Information
|
||||||
operationId: streamInfo
|
operationId: streamInfo
|
||||||
|
@ -64,6 +75,7 @@ paths:
|
||||||
example: dQw4w9WgXcQ
|
example: dQw4w9WgXcQ
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
pattern: ^([a-zA-Z0-9_-]{11})$
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The information about the video.
|
description: The information about the video.
|
||||||
|
@ -80,6 +92,7 @@ paths:
|
||||||
/channel/{channelId}:
|
/channel/{channelId}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
- channel
|
||||||
- unauthenticated
|
- unauthenticated
|
||||||
summary: Gets Channel Information
|
summary: Gets Channel Information
|
||||||
operationId: channelInfoId
|
operationId: channelInfoId
|
||||||
|
@ -93,6 +106,7 @@ paths:
|
||||||
example: UCs6KfncB4OV6Vug4o_bzijg
|
example: UCs6KfncB4OV6Vug4o_bzijg
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
pattern: ^([a-zA-Z0-9_-]{24})$
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The information about the channel.
|
description: The information about the channel.
|
||||||
|
@ -109,6 +123,7 @@ paths:
|
||||||
/c/{name}:
|
/c/{name}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
- channel
|
||||||
- unauthenticated
|
- unauthenticated
|
||||||
summary: Gets Channel Information
|
summary: Gets Channel Information
|
||||||
operationId: channelInfoName
|
operationId: channelInfoName
|
||||||
|
@ -138,6 +153,7 @@ paths:
|
||||||
/user/{username}:
|
/user/{username}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
- channel
|
||||||
- unauthenticated
|
- unauthenticated
|
||||||
summary: Gets Channel Information
|
summary: Gets Channel Information
|
||||||
operationId: channelInfoUsername
|
operationId: channelInfoUsername
|
||||||
|
@ -167,6 +183,7 @@ paths:
|
||||||
/nextpage/channel/{channelId}:
|
/nextpage/channel/{channelId}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
- channel
|
||||||
- unauthenticated
|
- unauthenticated
|
||||||
summary: Gets more channel videos
|
summary: Gets more channel videos
|
||||||
operationId: channelNextPage
|
operationId: channelNextPage
|
||||||
|
@ -180,6 +197,7 @@ paths:
|
||||||
example: UCs6KfncB4OV6Vug4o_bzijg
|
example: UCs6KfncB4OV6Vug4o_bzijg
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
pattern: "^[a-zA-Z0-9_-]{24}$"
|
||||||
- in: query
|
- in: query
|
||||||
name: nextpage
|
name: nextpage
|
||||||
description: The next page token to get more videos from.
|
description: The next page token to get more videos from.
|
||||||
|
@ -202,6 +220,7 @@ paths:
|
||||||
/comments/{videoId}:
|
/comments/{videoId}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
- video
|
||||||
- unauthenticated
|
- unauthenticated
|
||||||
summary: Gets Comments
|
summary: Gets Comments
|
||||||
operationId: comments
|
operationId: comments
|
||||||
|
@ -215,6 +234,7 @@ paths:
|
||||||
example: dQw4w9WgXcQ
|
example: dQw4w9WgXcQ
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
pattern: ^([a-zA-Z0-9_-]{11})$
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The first page of comments for the video.
|
description: The first page of comments for the video.
|
||||||
|
@ -231,6 +251,7 @@ paths:
|
||||||
/nextpage/comments/{videoId}:
|
/nextpage/comments/{videoId}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
- video
|
||||||
- unauthenticated
|
- unauthenticated
|
||||||
summary: Gets more comments
|
summary: Gets more comments
|
||||||
operationId: commentsNextPage
|
operationId: commentsNextPage
|
||||||
|
@ -244,6 +265,7 @@ paths:
|
||||||
example: dQw4w9WgXcQ
|
example: dQw4w9WgXcQ
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
pattern: ^([a-zA-Z0-9_-]{11})$
|
||||||
- in: query
|
- in: query
|
||||||
name: nextpage
|
name: nextpage
|
||||||
description: The next page token to get more comments from.
|
description: The next page token to get more comments from.
|
||||||
|
@ -266,6 +288,7 @@ paths:
|
||||||
/search:
|
/search:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
- search
|
||||||
- unauthenticated
|
- unauthenticated
|
||||||
summary: Searches for videos, channels, and playlists.
|
summary: Searches for videos, channels, and playlists.
|
||||||
operationId: search
|
operationId: search
|
||||||
|
@ -301,6 +324,7 @@ paths:
|
||||||
/nextpage/search:
|
/nextpage/search:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
- search
|
||||||
- unauthenticated
|
- unauthenticated
|
||||||
summary: Gets more search results
|
summary: Gets more search results
|
||||||
operationId: searchNextPage
|
operationId: searchNextPage
|
||||||
|
@ -342,6 +366,7 @@ paths:
|
||||||
/feed/unauthenticated:
|
/feed/unauthenticated:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
- feed
|
||||||
- unauthenticated
|
- unauthenticated
|
||||||
summary: Generate a feed while unauthenticated, from a list of channelIds.
|
summary: Generate a feed while unauthenticated, from a list of channelIds.
|
||||||
operationId: feedUnauthenticated
|
operationId: feedUnauthenticated
|
||||||
|
@ -649,6 +674,7 @@ components:
|
||||||
fps:
|
fps:
|
||||||
type: integer
|
type: integer
|
||||||
StreamItem:
|
StreamItem:
|
||||||
|
type: object
|
||||||
required:
|
required:
|
||||||
- duration
|
- duration
|
||||||
- thumbnail
|
- thumbnail
|
||||||
|
|
Loading…
Reference in a new issue