diff --git a/docs/api.md b/docs/api.md index 02461aa..2e8240c 100644 --- a/docs/api.md +++ b/docs/api.md @@ -301,7 +301,7 @@ Captions can also be selected with an ISO `lang`, e.g. &lang=en, `tlang` will au Parameters: ``` -type: "music", "gaming", "news", "movies" +type: "music", "gaming", "movies", "default" region: ISO 3166 country code (default: "US") ``` @@ -337,183 +337,6 @@ region: ISO 3166 country code (default: "US") ] ``` -##### GET `/api/v1/channels/comments/:ucid`, `/api/v1/channels/:ucid/comments` - - -```javascript -{ - "authorId": String, - "comments": [ - { - "author": String, - "authorThumbnails": [ - "url": String, - "width": Int32, - "height": Int32 - ], - "authorId": String, - "authorUrl": String, - "isEdited": Bool, - "content": String, - "contentHtml": String, - "published": Int64, - "publishedText": String, - "likeCount": Int32, - "commentId": String, - "authorIsChannelOwner": Bool, - "creatorHeart": { - "creatorThumbnail": String, - "creatorName": String - }?, - "replies": { - "replyCount": Int32, - "continuation": String - }?, - "attachment": Attachment? - } - ], - "continuation": String? -} -``` - -The `authorId` for top-level comments will always(?) be the same as the requested channel. Top-level comments will also have an optional `attachment`, which can be one of: - -```javascript -{ - "type": "image", - "imageThumbnails": [ - { - "url": String, - "width": Int32, - "height": Int32 - } - ] -} -``` - -```javascript -{ - "type": "video", - "title": String, - "videoId": String, - "videoThumbnails": [ - { - "quality": String, - "url": String, - "width": Int32, - "height": Int32 - } - ], - "lengthSeconds": Int32, - "author": String, - "authorId": String, - "authorUrl": String, - "published": Int64, - "publishedText": String, - "viewCount": Int64, - "viewCountText": String -} -``` - -```javascript -{ - "type": "unknown", - "error": "Unrecognized attachment type." -} -``` - -Some attachments may only have a `type` and `error`, similar to the above. Attachments will *only* be present on top-level comments. - -Parameters: - -``` -continuation: String -``` - -##### GET `/api/v1/channels/search/:ucid` - -> Schema: - -```javascript -[ - { - type: "video", - 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, - liveNow: Bool, - paid: Bool, - premium: Bool - }, - { - type: "playlist", - 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 - } - ] - } - ] - }, - { - type: "channel", - author: String, - authorId: String, - authorUrl: String, - - authorThumbnails: [ - { - url: String, - width: Int32, - height: Int32 - } - ], - subCount: Int32, - videoCount: Int32, - description: String, - descriptionHtml: String - } -]; -``` - -Parameters: - -``` -q: String -page: Int32 -``` - ##### GET `/api/v1/search/suggestions` > Schema: @@ -616,7 +439,7 @@ Parameters: ``` q: String page: Int32 -sort_by: "relevance", "rating", "upload_date", "view_count" +sort: "relevance", "rating", "date", "views" date: "hour", "today", "week", "month", "year" duration: "short", "long", "medium" type: "video", "playlist", "channel", "movie", "show", "all", (default: all) @@ -707,3 +530,47 @@ page: Int32 ] } ``` + +##### GET `/api/v1/hashtag/:tag` +> Schema: +```javascript +{ + results: VideoObject[], +} +``` +Parameters: +``` +page: Int32 +``` + +##### GET `/api/v1/resolveurl` +> Schema: +```javascript +{ + ucid?: String, + videoId?: String, + playlistId?: String, + startTimeSeconds?: String, + params?: String, + pageType: string +} +``` +Parameters: +``` +url: URL +``` + +##### GET `/api/v1/clips` +> Schema: +```javascript +{ + startTime: Float64, // in seconds + endTime: Float64, // in seconds + clipTitle: String, + video: VideoObject +} +``` +Parameters: +``` +id: string +``` \ No newline at end of file diff --git a/docs/api/channels_endpoint.md b/docs/api/channels_endpoint.md index 2bd4b8d..52ec936 100644 --- a/docs/api/channels_endpoint.md +++ b/docs/api/channels_endpoint.md @@ -85,6 +85,39 @@ This is the same as requesting `/api/v1/channels/:id/videos` without URL paramet } ``` +##### GET `/api/v1/channels/:id/podcasts` + +> 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 +{ + "playlists": [ + // One or more PlaylistOject + ], + "continuation": continuation +} +``` + +##### GET `/api/v1/channels/:id/releases` + +> 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 +{ + "playlists": [ + // One or more PlaylistOject + ], + "continuation": continuation +} +``` ##### GET `/api/v1/channels/:id/shorts` @@ -206,3 +239,34 @@ This usually means that parsing support for the attachment type has not yet been "error": String } ``` + +##### GET `/api/v1/channels/:ucid/search` + +> Url parameters +* `q`: The query to search +* `page`: The page number of the search (Int32) + +> Response: +```javascript +[ + VideoObject, + PlaylistObject +]; +``` + +##### GET `/api/v1/post/:id` +> Url parameters + +* `ucid`: You can optionally provide the channel's id for fetching the post. + +> Response: +Same as [`/api/v1/channels/:id/community`](#get-apiv1channelsidcommunity) but only returns one post in the comments array + + + +##### GET `/api/v1/post/:id/comments` + +* `ucid`: You can optionally provide the channel's id for fetching the post's comments. + +> Response: +Same as [`/api/v1/channels/:id/comments`](../api.md#get-apiv1commentsid) but has a postId instead of a videoId \ No newline at end of file diff --git a/docs/search-filters.md b/docs/search-filters.md index b5abdd1..280eeae 100644 --- a/docs/search-filters.md +++ b/docs/search-filters.md @@ -13,8 +13,8 @@ Supported operators: - `sort:` - `relevance` (default) - `rating` - - `upload_date`, `date` - - `view_count`, `views` + - `date` + - `views` - `date:` - `hour` - `today` @@ -30,11 +30,13 @@ Supported operators: - `show` - `duration:` - `short` + - `medium` - `long` - `features:` Multiple can be specified, for example `features:live,4k,subtitles` - `hd` - `subtitles` - `creative_commons`,`cc` + - `3d` - `live`, `livestream` - `purchased` - `4k` diff --git a/docs/url-parameters.md b/docs/url-parameters.md index 1caf7cd..39e2192 100644 --- a/docs/url-parameters.md +++ b/docs/url-parameters.md @@ -86,7 +86,6 @@ _This list is incomplete. You can help by expanding it._ | `type=Default` | Default | | `type=Music` | Music | | `type=Gaming` | Gaming | -| `type=News` | News | | `type=Movies` | Movies | | _Region_ | Provide "hint" (as ISO 3166 country code) for Invidious to load trending videos from the specified region | | | `region=JP` | Load videos that are trending in Japan |