From 3de4647e8a5244a23aae004566e90a044ccf67ae Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 25 Feb 2019 09:47:40 -0600 Subject: [PATCH] Updated API (markdown) --- API.md | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 89 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index e85134f..56a62ec 100644 --- a/API.md +++ b/API.md @@ -48,8 +48,8 @@ "allowRatings": Bool, "rating": Float32, "isListed": Bool?, - "hlsUrl": String?, + "hlsUrl": String?, "adaptiveFormats": [ { "index": String, @@ -155,6 +155,8 @@ continuation: String ##### GET `/api/v1/insights/:id` +**Will always return 503: `YouTube has removed publicly-available analytics`*** + > Schema: ```javascript @@ -225,7 +227,11 @@ Captions can also be selected with an ISO `lang`, e.g. &lang=en, `tlang` will au "published": Int64, "publishedText": String, "description": String, - "descriptionHtml": String + "descriptionHtml": String, + + "liveNow": Bool, + "paid": Bool, + "premium": Bool } ] ``` @@ -289,11 +295,14 @@ Captions can also be selected with an ISO `lang`, e.g. &lang=en, `tlang` will au "subCount": Int32, "totalViews": Int64, "joined": Int64, + "paid": Bool, + "autoGenerated": Bool, "isFamilyFriendly": Bool, "description": String, "descriptionHtml": String, "allowedRegions": Array(String), + "latestVideos": [ { "title": String, @@ -319,6 +328,20 @@ Captions can also be selected with an ISO `lang`, e.g. &lang=en, `tlang` will au "paid": Bool, "premium": Bool } + ], + "relatedChannels": [ + { + "author": String, + "authorId": String, + "authorUrl": String, + "authorThumbnails": [ + { + "url": String, + "width": Int32, + "height": Int32 + } + ] + } ] } ``` @@ -362,7 +385,7 @@ Note that a channel's username (if it doesn't include spaces) is also valid in p paid: Bool, premium: Bool } -]; +] ``` Parameters: @@ -372,6 +395,69 @@ 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? +} +``` + ##### GET `/api/v1/channels/search/:ucid` > Schema: