Fix various api documentation issues (#616)

* Fix various documentation issues

* improve documentation for videos api endpoint

* Add badges to video common_type and add sort_by for channel shorts and streams
This commit is contained in:
ChunkyProgrammer 2024-12-16 09:21:49 -05:00 committed by GitHub
parent 0486c7553f
commit c0a7d6abd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 53 additions and 4 deletions

View File

@ -117,11 +117,20 @@ All endpoints that return a JSON body support `&hl=LANGUAGE` for translating fie
"type": String, "type": String,
"clen": String, "clen": String,
"lmt": String, "lmt": String,
"projectionType": Int32, "projectionType": String,
"container": String, "container": String,
"encoding": String, "encoding": String,
"qualityLabel": String?, "qualityLabel": String?,
"resolution": String? "resolution": String?,
"fps": Int32,
"size": String?,
"targetDurationsec": Int64?,
"maxDvrDurationSec": Int64?,
"audioQuality": String?,
"audioSampleRate": String?,
"audioChannels": String?,
"colorInfo": String?,
"captionTrack": String?
} }
], ],
"formatStreams": [ "formatStreams": [
@ -130,6 +139,7 @@ All endpoints that return a JSON body support `&hl=LANGUAGE` for translating fie
"itag": String, "itag": String,
"type": String, "type": String,
"quality": String, "quality": String,
"bitrate": String?,
"container": String, "container": String,
"encoding": String, "encoding": String,
"qualityLabel": String, "qualityLabel": String,
@ -140,10 +150,18 @@ All endpoints that return a JSON body support `&hl=LANGUAGE` for translating fie
"captions": [ "captions": [
{ {
"label": String, "label": String,
"languageCode": String, "language_code": String,
"url": String "url": String
} }
], ],
"musicTracks": [
{
"song": String,
"artist": String,
"album": String,
"license": String
}
],
"recommendedVideos": [ "recommendedVideos": [
{ {
"videoId": String, "videoId": String,
@ -157,7 +175,18 @@ All endpoints that return a JSON body support `&hl=LANGUAGE` for translating fie
} }
], ],
"author": String, "author": String,
"authorUrl": String,
"authorId": String?,
"authorVerified": Boolean,
"authorThumbnails": [
{
"url": string,
"width": Int32,
"height": Int32
}
],
"lengthSeconds": Int32, "lengthSeconds": Int32,
"viewCount":
"viewCountText": String "viewCountText": String
} }
] ]
@ -203,6 +232,8 @@ Returns annotation XML from YouTube's `/annotations_invideo` endpoint. Alternati
"isEdited": Boolean, "isEdited": Boolean,
"isPinned": Boolean, "isPinned": Boolean,
"isSponsor": Boolean?,
"sponsorIconUrl": String?,
"content": String, "content": String,
"contentHtml": String, "contentHtml": String,
@ -430,6 +461,13 @@ q: String
videoCount: Int32, videoCount: Int32,
description: String, description: String,
descriptionHtml: String descriptionHtml: String
},
{
type: "hashtag"
title: String,
url: String,
channelCount: Int32,
videoCount: Int32
} }
]; ];
``` ```
@ -470,6 +508,7 @@ region: ISO 3166 country code (default: "US")
"videoCount": Int32, "videoCount": Int32,
"viewCount": Int64, "viewCount": Int64,
"viewCountText": String,
"updated": Int64, "updated": Int64,
"videos": [ "videos": [

View File

@ -124,6 +124,7 @@ This is the same as requesting `/api/v1/channels/:id/videos` without URL paramet
> URL parameters: > URL parameters:
* `continuation`: A continuation token to get the next chunk of items. The token is provided each time this API is requested. * `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`
> Response: > Response:
@ -135,6 +136,7 @@ See: GET `/api/v1/channels/:id/videos`
> URL parameters: > URL parameters:
* `continuation`: A continuation token to get the next chunk of items. The token is provided each time this API is requested. * `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`
> Response: > Response:

View File

@ -57,7 +57,15 @@
"liveNow": Boolean, "liveNow": Boolean,
"premium": Boolean, "premium": Boolean,
"isUpcoming": Boolean "isUpcoming": Boolean,
"isNew" Boolean,
"is4k": Boolean,
"is8k": Boolean,
"isVr180": Boolean,
"isVr360": Boolean,
"is3d": Boolean,
"hasCaptions": Boolean
} }
``` ```