Updated API (markdown)

This commit is contained in:
Omar Roth 2019-02-25 09:47:40 -06:00
parent 5a519515de
commit 3de4647e8a

92
API.md
View File

@ -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: