OAuthPlaylists
popyt / OAuth / OAuthPlaylists
Class: OAuthPlaylists
Defined in: oauth/playlists.ts:11
Constructors
Constructor
new OAuthPlaylists(
oauth,request):OAuthPlaylists
Defined in: oauth/playlists.ts:14
Parameters
oauth
request
Request
Returns
OAuthPlaylists
Properties
oauth
oauth:
OAuth
Defined in: oauth/playlists.ts:14
Methods
addPlaylistItem()
addPlaylistItem(
playlistResolvable,videoResolvable,position?,note?):Promise<Video>
Defined in: oauth/playlists.ts:118
Parameters
playlistResolvable
The playlist to add the video to.
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.
createPlaylist()
createPlaylist(
title,description?,privacy?,tags?,language?,localizations?):Promise<Playlist>
Defined in: oauth/playlists.ts:27
Creates a Playlist.
Parameters
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?
Translated titles and descriptions.
Returns
Promise<Playlist>
deletePlaylist()
deletePlaylist(
playlistResolvable):Promise<void>
Defined in: oauth/playlists.ts:100
Deletes a Playlist.
Parameters
playlistResolvable
The playlist to delete.
Returns
Promise<void>
deletePlaylistItem()
deletePlaylistItem(
id):Promise<void>
Defined in: oauth/playlists.ts:188
Deletes a playlist item.
Parameters
id
string
The ID of the playlist item to delete.
Returns
Promise<void>
updatePlaylist()
updatePlaylist(
playlistResolvable,title,description?,privacy?,tags?,language?,localizations?):Promise<Playlist>
Defined in: oauth/playlists.ts:66
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.
Parameters
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?
Translated titles and descriptions.
Returns
Promise<Playlist>
updatePlaylistItem()
updatePlaylistItem(
id,playlistResolvable,videoResolvable,position?,note?):Promise<Video>
Defined in: oauth/playlists.ts:156
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.
Parameters
id
string
The ID of the playlist item to edit.
playlistResolvable
The playlist that the video is in.
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.