Playlists
Playlists are custom lists of media that users can create. These are mutable; they can be created, updated, shared, and deleted by users of the server.
Create
To create a playlist, use the CreatePlaylist operation. This operation accepts a data transfer object that can populate details of the playlist, including:
Nameof the playlistIdsof items to include in the playlistUserIdof the user who should "own" the playlistMediaTypeof the playlistUsersthat have access and optionally the ability to edit the playlistIsPublic- whether or not the playlist is publicly accessible to all users
Read
To retrieve all playlist items from the library, use the GetItems operation from the Items API, specifying the Playlist library's Id as the parentId.
To retrieve a specific playlist along with it's contents, use the GetPlaylist operation and specify the Id of the desired playlist.
Update
There are multiple methods available for updating a playlist and it's contents.
The simplest way is by using the UpdatePlaylist operation, of which can facilitate renaming, updating permissions, and updating the playlist contents. This accepts a data transfer object of which the following can be specified:
Nameof the playlistIdsof items to include in the playlistUsersthat have access an optionally the ability to edit the playlistIsPublic- whether or not the playlist is publicly accessible to all users
There are additional endpoints, however, whose functionality is more directed at modifying the contents of the playlist. These are the RemoveItemFromPlaylist operation and the MoveItem operation.
Delete
To delete a playlist from the library, use the DeleteItem operation from the Library API.
Sharing
To see what users have access to a playlist and what permissions they have, use the GetPlaylistUsers operation. This will return the Ids of the users with access, as well as a CanEdit value indicating whether they can edit the playlist.
To update a user's permissions for a playlist, use the UpdatePlaylistUser operation. This operation accepts a data transfer object with a CanEdit field, which will grant edit permissions to the user if set to true when sent.
To remove a user's access from a playlist, use the RemoveUserFromPlaylist operation.