mirror of
https://github.com/iv-org/documentation.git
synced 2025-05-02 06:46:22 -04:00
Update channels api docs (#326)
* Add a page specifying common object types * Add a page for the /api/v1/channels endpoint * Remove obselete definitions from api.md * Add/update links in index.md and mkdocs.yml * Impove MkDocs config to support code highlight & copy button * Use native JS types for better syntax highlighting
This commit is contained in:
parent
4a66173585
commit
dca939835c
6 changed files with 250 additions and 199 deletions
124
docs/api/channels_endpoint.md
Normal file
124
docs/api/channels_endpoint.md
Normal file
|
@ -0,0 +1,124 @@
|
|||
# Channels endpoint
|
||||
|
||||
Please refer to the [Common object types](./common_types.md) page for more
|
||||
details on the various JSON objects used below.
|
||||
|
||||
|
||||
##### GET `/api/v1/channels/:id`
|
||||
|
||||
> Response:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"author": String,
|
||||
"authorId": String,
|
||||
"authorUrl": String,
|
||||
"authorBanners": [
|
||||
// One or more ImageObject
|
||||
],
|
||||
"authorThumbnails": [
|
||||
// One or more ImageObject
|
||||
],
|
||||
|
||||
"subCount": Number, // Integer
|
||||
"totalViews": Number, // Integer
|
||||
"joined": Number, // Unix timestamp
|
||||
|
||||
"autoGenerated": Boolean,
|
||||
"isFamilyFriendly": Boolean,
|
||||
|
||||
"description": String,
|
||||
"descriptionHtml": String,
|
||||
"allowedRegions": [String],
|
||||
|
||||
"latestVideos": [
|
||||
// One or more VideoObject
|
||||
],
|
||||
"relatedChannels": [
|
||||
// One or more ChannelObject
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
##### GET `/api/v1/channels/:id/channels`
|
||||
|
||||
> URL parameters:
|
||||
|
||||
* `continuation`: A continuation token to get the next chunk of items. The token is provided each time this API is requested.
|
||||
|
||||
> Response:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"relatedChannels": [
|
||||
// One or more ChannelObject
|
||||
],
|
||||
"continuation": String
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
##### GET `/api/v1/channels/:id/latest`
|
||||
|
||||
This is the same as requesting `/api/v1/channels/:id/videos` without URL parameters.
|
||||
|
||||
|
||||
##### GET `/api/v1/channels/:id/playlists`
|
||||
|
||||
> URL parameters:
|
||||
|
||||
* `continuation`: A continuation token to get the next chunk of items. The token is provided each time this API is requested.
|
||||
* `sort_by`: Sort order filter. Accepted values: `oldest`, `newest`, `last`. Defaults to `last`.
|
||||
|
||||
> Response:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"playlists": [
|
||||
// One or more PlaylistOject
|
||||
],
|
||||
"continuation": continuation
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
##### GET `/api/v1/channels/:id/shorts`
|
||||
|
||||
> URL parameters:
|
||||
|
||||
* `continuation`: A continuation token to get the next chunk of items. The token is provided each time this API is requested.
|
||||
|
||||
> Response:
|
||||
|
||||
See: GET `/api/v1/channels/:id/videos`
|
||||
|
||||
|
||||
##### GET `/api/v1/channels/:id/streams`
|
||||
|
||||
> URL parameters:
|
||||
|
||||
* `continuation`: A continuation token to get the next chunk of items. The token is provided each time this API is requested.
|
||||
|
||||
> Response:
|
||||
|
||||
See: GET `/api/v1/channels/:id/videos`
|
||||
|
||||
|
||||
##### GET `/api/v1/channels/:id/videos`
|
||||
|
||||
> URL parameters:
|
||||
|
||||
* `continuation`: A continuation token to get the next chunk of items. The token is provided each time this API is requested.
|
||||
* `sort_by`: Sort order filter. Accepted values: `newest`, `popular` or `oldest` (Broken as of 10/2022). Default to `newest`.
|
||||
|
||||
> Response:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"videos": [
|
||||
// One or more VideoObject
|
||||
],
|
||||
"continuation": String
|
||||
}
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue