Files
YouTube.js/docs/API/playlist.md
LuanRT eb72c2f6ef refactor(parser): improve typings and do some refactoring (#305)
* dev: add response types

* dev: refactor `Parser#parseResponse()`

* dev: update YouTube parsers

* dev: update YouTube Music classes

* dev: update YouTube Kids classes

* dev: update core classes

* dev(Parser): fix some inconsistencies

* chore: update docs

* chore: update docs x2

* fix: export response types 

* chore(docs): update parser example
2023-02-12 07:04:17 -03:00

1.8 KiB

PlaylistManager

Playlist management class.

API

create(title, video_ids)

Creates a playlist.

Returns: Promise.<ApiResponse>

Param Type Description
title string Playlist name
video_ids string[] array of videos

delete(playlist_id)

Deletes given playlist.

Returns: Promise.<ApiResponse>

Param Type Description
playlist_id string Playlist id

addVideos(playlist_id, video_ids)

Adds videos to given playlist.

Returns: Promise.<{ playlist_id: string; action_result: any[] }>

Param Type Description
playlist_id string Playlist id
video_ids string array of videos

removeVideos(playlist_id, video_ids)

Removes videos from given playlist.

Returns: Promise.<{ playlist_id: string; action_result: any[] }>

Param Type Description
playlist_id string Playlist id
video_ids string array of videos

moveVideo(playlist_id, moved_video_id, predecessor_video_id)

Moves a video to a new position within a given playlist.

Returns: Promise.<{ playlist_id: string; action_result: any[] }>

Param Type Description
playlist_id string Playlist id
moved_video_id string the video to be moved
predecessor_video_id string the video present in the target position