Constructor
new Playlist(youtube, data)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
youtube |
YouTube
|
The YouTube instance creating this |
data |
Object
|
The data of the playlist |
Members
(nullable) channelTitle :string
Channel title of this playlist
- Source:
Type:
-
string
(nullable) defaultLanguage :string
The language in this playlist's title and description
- Source:
Type:
-
string
(nullable) description :string
This playlist's description
- Source:
Type:
-
string
embedHTML :string
A string with an iframe tag for embedding this playlist
- Source:
Type:
-
string
length :number
The total number of videos in this playlist
- Source:
Type:
-
number
(nullable) localized :Object
Information about the playlist as specified in the `hl` parameter
- Source:
Type:
-
Object
privacy :string
The privacy status of this video
- Source:
Type:
-
string
(nullable) publishedAt :Date
The date/time this playlist was published
- Source:
Type:
-
Date
(nullable) thumbnails :Object.<string, Thumbnail>
Thumbnails for this playlist
- Source:
Type:
-
Object.<string, Thumbnail>
videos :Array.<Video>
Videos in this playlist. Available after calling Playlist#getVideos.
- Source:
Type:
-
Array.<Video>
Methods
(static) extractID(url) → (nullable) {string}
Get a playlist ID from a string (URL or ID)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
url |
string
|
The string to get the ID from |
Returns:
- Type:
-
string
fetch(optionsopt) → {Playlist}
Fetch the full representation of this playlist.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
object
|
<optional> |
Any extra query params |
Returns:
- Type:
-
Playlist
getVideos(limitopt, optionsopt) → {Promise.<Array.<Video>>}
Gets videos in the playlist
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
limit |
Number
|
<optional> |
Maximum number of videos to obtain. Fetches all if not provided. |
options |
Object
|
<optional> |
Options to retrieve for each video. |
Returns:
- Type:
-
Promise.<Array.<Video>>