mirror of
https://github.com/iv-org/documentation.git
synced 2025-05-05 08:14:59 -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
197
docs/api.md
197
docs/api.md
|
@ -321,203 +321,6 @@ region: ISO 3166 country code (default: "US")
|
|||
]
|
||||
```
|
||||
|
||||
##### GET `/api/v1/channels/:ucid`
|
||||
|
||||
> Schema:
|
||||
|
||||
```javascript
|
||||
{
|
||||
"author": String,
|
||||
"authorId": String,
|
||||
"authorUrl": String,
|
||||
"authorBanners": [
|
||||
{
|
||||
"url": String,
|
||||
"width": Int32,
|
||||
"height": Int32
|
||||
}
|
||||
],
|
||||
"authorThumbnails": [
|
||||
{
|
||||
"url": String,
|
||||
"width": Int32,
|
||||
"height": Int32
|
||||
}
|
||||
],
|
||||
|
||||
"subCount": Int32,
|
||||
"totalViews": Int64,
|
||||
"joined": Int64,
|
||||
|
||||
"paid": Bool,
|
||||
"autoGenerated": Bool,
|
||||
"isFamilyFriendly": Bool,
|
||||
"description": String,
|
||||
"descriptionHtml": String,
|
||||
"allowedRegions": Array(String),
|
||||
|
||||
"latestVideos": [
|
||||
{
|
||||
"title": String,
|
||||
"videoId": String,
|
||||
"author": String,
|
||||
"authorId": String,
|
||||
"authorUrl": String,
|
||||
|
||||
"videoThumbnails": [
|
||||
{
|
||||
"quality": String,
|
||||
"url": String,
|
||||
"width": Int32,
|
||||
"height": Int32
|
||||
}
|
||||
],
|
||||
"description": String,
|
||||
"descriptionHtml": String,
|
||||
"viewCount": Int64,
|
||||
"published": Int64,
|
||||
"publishedText": String,
|
||||
"lengthSeconds": Int32,
|
||||
"paid": Bool,
|
||||
"premium": Bool
|
||||
}
|
||||
],
|
||||
"relatedChannels": [
|
||||
{
|
||||
"author": String,
|
||||
"authorId": String,
|
||||
"authorUrl": String,
|
||||
"authorThumbnails": [
|
||||
{
|
||||
"url": String,
|
||||
"width": Int32,
|
||||
"height": Int32
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
```
|
||||
sort_by: "newest", "oldest", "popular" (default: newest)
|
||||
```
|
||||
|
||||
Note that a channel's username (if it doesn't include spaces) is also valid in place of `ucid`, e.g. `/api/v1/channels/BlenderFoundation`.
|
||||
|
||||
##### GET `/api/v1/channels/:ucid/videos`, `/api/v1/channels/videos/:ucid`
|
||||
|
||||
> Schema:
|
||||
|
||||
```javascript
|
||||
[
|
||||
{
|
||||
title: String,
|
||||
videoId: String,
|
||||
author: String,
|
||||
authorId: String,
|
||||
authorUrl: String,
|
||||
|
||||
videoThumbnails: [
|
||||
{
|
||||
quality: String,
|
||||
url: String,
|
||||
width: Int32,
|
||||
height: Int32
|
||||
}
|
||||
],
|
||||
description: String,
|
||||
descriptionHtml: String,
|
||||
|
||||
viewCount: Int64,
|
||||
published: Int64,
|
||||
publishedText: String,
|
||||
lengthSeconds: Int32
|
||||
paid: Bool,
|
||||
premium: Bool
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
```
|
||||
page: Int32
|
||||
sort_by: "newest", "oldest", "popular" (default: newest)
|
||||
```
|
||||
|
||||
##### GET `/api/v1/channels/:ucid/latest`, `/api/v1/channels/latest/:ucid`
|
||||
|
||||
```javascript
|
||||
[
|
||||
{
|
||||
title: String,
|
||||
videoId: String,
|
||||
authorId: String,
|
||||
authorUrl: String,
|
||||
|
||||
videoThumbnails: [
|
||||
{
|
||||
quality: String,
|
||||
url: String,
|
||||
width: Int32,
|
||||
height: Int32
|
||||
}
|
||||
],
|
||||
description: String,
|
||||
descriptionHtml: String,
|
||||
|
||||
viewCount: Int64,
|
||||
published: Int64,
|
||||
publishedText: String,
|
||||
lengthSeconds: Int32
|
||||
paid: Bool,
|
||||
premium: Bool
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
##### GET `/api/v1/channels/playlists/:ucid`, `/api/v1/channels/:ucid/playlists`
|
||||
|
||||
```javascript
|
||||
{
|
||||
"playlists": [
|
||||
{
|
||||
"title": String,
|
||||
"playlistId": String,
|
||||
"author": String,
|
||||
"authorId": String,
|
||||
"authorUrl": String,
|
||||
"videoCount": Int32,
|
||||
"videos": [
|
||||
{
|
||||
"title": String,
|
||||
"videoId": String,
|
||||
"lengthSeconds": Int32,
|
||||
"videoThumbnails": [
|
||||
{
|
||||
"quality": String,
|
||||
"url": String,
|
||||
"width": Int32,
|
||||
"height": Int32
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"continuation": String?
|
||||
}
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
```
|
||||
continuation: String
|
||||
sort_by: "oldest", "newest", "last"
|
||||
```
|
||||
|
||||
##### GET `/api/v1/channels/comments/:ucid`, `/api/v1/channels/:ucid/comments`
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue