Documentation
OAuth.OAuthPlaylists
Constructors
constructor
• new OAuthPlaylists(oauth
)
Parameters
Name | Type |
---|---|
oauth | OAuth |
Defined in
Properties
oauth
• oauth: OAuth
Defined in
Methods
addPlaylistItem
▸ addPlaylistItem(playlistResolvable
, videoResolvable
, position?
, note?
): Promise
<Video
>
Adds a Video to a Playlist.
Last tested 05/18/2020 11:48. PASSING
Parameters
Name | Type | Description |
---|---|---|
playlistResolvable | PlaylistResolvable | The playlist to add the video to. |
videoResolvable | VideoResolvable | The video to add to the playlist. |
position? | number | The position to add the video in. Defaults to the end. |
note? | string | A user-generated note on the video. |
Returns
Promise
<Video
>
A partial video object.
Defined in
createPlaylist
▸ createPlaylist(title
, description?
, privacy?
, tags?
, language?
, localizations?
): Promise
<Playlist
>
Creates a Playlist.
Last tested 05/18/2020 11:48. PASSING
Parameters
Name | Type | Description |
---|---|---|
title | string | A title for the playlist. |
description? | string | A description of the playlist. |
privacy? | "private" | "public" | "unlisted" | Whether the video is private, public, or unlisted. |
tags? | string [] | Tags pertaining to the playlist. |
language? | string | The language of the playlist's default title and description. |
localizations? | Object | Translated titles and descriptions. |
Returns
Promise
<Playlist
>
Defined in
deletePlaylist
▸ deletePlaylist(playlistResolvable
): Promise
<void
>
Deletes a Playlist.
Last tested 05/18/2020 11:48. PASSING
Parameters
Name | Type | Description |
---|---|---|
playlistResolvable | PlaylistResolvable | The playlist to delete. |
Returns
Promise
<void
>
Defined in
deletePlaylistItem
▸ deletePlaylistItem(id
): Promise
<void
>
Deletes a playlist item.
Last tested 05/18/2020 11:48. PASSING
Parameters
Name | Type | Description |
---|---|---|
id | string | The ID of the playlist item to delete. |
Returns
Promise
<void
>
Defined in
updatePlaylist
▸ updatePlaylist(playlistResolvable
, title
, description?
, privacy?
, tags?
, language?
, localizations?
): Promise
<Playlist
>
Updates a Playlist.
If your request does not specify a value for a property that already has a value,
the property's existing value will be deleted.
Last tested 05/18/2020 11:48. PASSING
Parameters
Name | Type | Description |
---|---|---|
playlistResolvable | PlaylistResolvable | The playlist to update. |
title | string | A title for the playlist. |
description? | string | A description of the playlist. |
privacy? | "private" | "public" | "unlisted" | Whether the video is private, public, or unlisted. |
tags? | string [] | Tags pertaining to the playlist. |
language? | string | The language of the playlist's default title and description. |
localizations? | Object | Translated titles and descriptions. |
Returns
Promise
<Playlist
>
Defined in
updatePlaylistItem
▸ updatePlaylistItem(id
, playlistResolvable
, videoResolvable
, position?
, note?
): Promise
<Video
>
Edits a playlist item.
If your request does not specify a value for a property that already has a value,
the property's existing value will be deleted.
Last tested 05/18/2020 11:48. PASSING
Parameters
Name | Type | Description |
---|---|---|
id | string | The ID of the playlist item to edit. |
playlistResolvable | PlaylistResolvable | The playlist that the video is in. |
videoResolvable | VideoResolvable | The video that's in the playlist. |
position? | number | The position to change the playlist item's to. |
note? | string | The note to change the playlist item's to. |
Returns
Promise
<Video
>
A partial video object.