Skip to main content

Documentation

OAuth.OAuthPlaylists

Constructors

constructor

new OAuthPlaylists(oauth)

Parameters

NameType
oauthOAuth

Defined in

oauth/playlists.ts:10

Properties

oauth

oauth: OAuth

Defined in

oauth/playlists.ts:10

Methods

addPlaylistItem

addPlaylistItem(playlistResolvable, videoResolvable, position?, note?): Promise<Video>

Adds a Video to a Playlist.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameTypeDescription
playlistResolvablePlaylistResolvableThe playlist to add the video to.
videoResolvableVideoResolvableThe video to add to the playlist.
position?numberThe position to add the video in. Defaults to the end.
note?stringA user-generated note on the video.

Returns

Promise<Video>

A partial video object.

Defined in

oauth/playlists.ts:116


createPlaylist

createPlaylist(title, description?, privacy?, tags?, language?, localizations?): Promise<Playlist>

Creates a Playlist.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameTypeDescription
titlestringA title for the playlist.
description?stringA description of the playlist.
privacy?"private" | "public" | "unlisted"Whether the video is private, public, or unlisted.
tags?string[]Tags pertaining to the playlist.
language?stringThe language of the playlist's default title and description.
localizations?ObjectTranslated titles and descriptions.

Returns

Promise<Playlist>

Defined in

oauth/playlists.ts:22


deletePlaylist

deletePlaylist(playlistResolvable): Promise<void>

Deletes a Playlist.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameTypeDescription
playlistResolvablePlaylistResolvableThe playlist to delete.

Returns

Promise<void>

Defined in

oauth/playlists.ts:97


deletePlaylistItem

deletePlaylistItem(id): Promise<void>

Deletes a playlist item.
Last tested 05/18/2020 11:48. PASSING

Parameters

NameTypeDescription
idstringThe ID of the playlist item to delete.

Returns

Promise<void>

Defined in

oauth/playlists.ts:188


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

NameTypeDescription
playlistResolvablePlaylistResolvableThe playlist to update.
titlestringA title for the playlist.
description?stringA description of the playlist.
privacy?"private" | "public" | "unlisted"Whether the video is private, public, or unlisted.
tags?string[]Tags pertaining to the playlist.
language?stringThe language of the playlist's default title and description.
localizations?ObjectTranslated titles and descriptions.

Returns

Promise<Playlist>

Defined in

oauth/playlists.ts:62


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

NameTypeDescription
idstringThe ID of the playlist item to edit.
playlistResolvablePlaylistResolvableThe playlist that the video is in.
videoResolvableVideoResolvableThe video that's in the playlist.
position?numberThe position to change the playlist item's to.
note?stringThe note to change the playlist item's to.

Returns

Promise<Video>

A partial video object.

Defined in

oauth/playlists.ts:155