youtubei.js / Managers / PlaylistManager
Class: PlaylistManager
Constructors
new PlaylistManager()
new PlaylistManager(
actions
):PlaylistManager
Parameters
• actions: Actions
Returns
Defined in
src/core/managers/PlaylistManager.ts:14
Methods
addVideos()
addVideos(
playlist_id
,video_ids
):Promise
<object
>
Adds videos to a given playlist.
Parameters
• playlist_id: string
The playlist ID.
• video_ids: string
[]
An array of video IDs to add to the playlist.
Returns
Promise
<object
>
action_result
action_result:
any
playlist_id
playlist_id:
string
Defined in
src/core/managers/PlaylistManager.ts:73
create()
create(
title
,video_ids
):Promise
<object
>
Creates a playlist.
Parameters
• title: string
The title of the playlist.
• video_ids: string
[]
An array of video IDs to add to the playlist.
Returns
Promise
<object
>
data
data:
any
playlist_id?
optional
playlist_id:string
status_code
status_code:
number
success
success:
boolean
Defined in
src/core/managers/PlaylistManager.ts:23
delete()
delete(
playlist_id
):Promise
<object
>
Deletes a given playlist.
Parameters
• playlist_id: string
The playlist ID.
Returns
Promise
<object
>
data
data:
any
playlist_id
playlist_id:
string
status_code
status_code:
number
success
success:
boolean
Defined in
src/core/managers/PlaylistManager.ts:48
moveVideo()
moveVideo(
playlist_id
,moved_video_id
,predecessor_video_id
):Promise
<object
>
Moves a video to a new position within a given playlist.
Parameters
• playlist_id: string
The playlist ID.
• moved_video_id: string
The video ID to move.
• predecessor_video_id: string
The video ID to move the moved video before.
Returns
Promise
<object
>
action_result
action_result:
any
playlist_id
playlist_id:
string
Defined in
src/core/managers/PlaylistManager.ts:156
removeVideos()
removeVideos(
playlist_id
,video_ids
,use_set_video_ids
):Promise
<object
>
Removes videos from a given playlist.
Parameters
• playlist_id: string
The playlist ID.
• video_ids: string
[]
An array of video IDs to remove from the playlist.
• use_set_video_ids: boolean
= false
Option to remove videos using set video IDs.
Returns
Promise
<object
>
action_result
action_result:
any
playlist_id
playlist_id:
string
Defined in
src/core/managers/PlaylistManager.ts:101
setDescription()
setDescription(
playlist_id
,description
):Promise
<object
>
Sets the description for the given playlist.
Parameters
• playlist_id: string
The playlist ID.
• description: string
The description to use for the playlist.
Returns
Promise
<object
>
action_result
action_result:
any
playlist_id
playlist_id:
string
Defined in
src/core/managers/PlaylistManager.ts:239
setName()
setName(
playlist_id
,name
):Promise
<object
>
Sets the name (title) for the given playlist.
Parameters
• playlist_id: string
The playlist ID.
• name: string
The name / title to use for the playlist.
Returns
Promise
<object
>
action_result
action_result:
any
playlist_id
playlist_id:
string