# PlaylistManager Playlist management class. ## API * PlaylistManager * [.create(title, video_ids)](#create) * [.delete(playlist_id)](#delete) * [.addVideos(playlist_id, video_ids)](#addvideos) * [.removeVideos(playlist_id, video_ids)](#removevideos) * [.moveVideo(playlist_id, moved_video_id, predecessor_video_id)](#movevideo) * [.setName(playlist_id, name)](#setname) * [.setDescription(playlist_id, description)](#setdescription) ### create(title, video_ids) Creates a playlist. **Returns:** `Promise.` | Param | Type | Description | | --- | --- | --- | | title | `string` | Playlist name | | video_ids | `string[]` | array of videos | ### delete(playlist_id) Deletes given playlist. **Returns:** `Promise.` | 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 | ### setName(playlist_id, name) Sets the name / title for the given playlist. **Returns:** `Promise.` | Param | Type | Description | | --- | --- | --- | | playlist_id | `string` | Playlist id | | name | `string` | Name / title | ### setDescription(playlist_id, description) Sets the description for the given playlist. **Returns:** `Promise.` | Param | Type | Description | | --- | --- | --- | | playlist_id | `string` | Playlist id | | description | `string` | Description |