Skip to content
Client
Server

Reference / @open-music-sdk/lib-playlists / playlists

Function: playlists() ​

ts
function playlists(client): tPlaylists;

Defined in: lib/lib-playlists/src/playlists.ts:124

The playlist verbs for one client: resolve, read, plan and apply. The client is checked here, and nothing is asked of it until a verb is called. What it gives is frozen and inherits nothing.

read and apply are the listener's, and need a client with a Music User Token: music.as(token) or music.forUser(userId). resolve asks the catalog, and plan asks nothing.

Parameters ​

client ​

tAppleMusicClient

The client to ask with: one from createClient, or anything with its request, paginate and storefront.

Returns ​

tPlaylists

The four verbs for that client, frozen and inheriting nothing.

Throws ​

TypeError if client is no client.

MIT licensed. Not affiliated with, endorsed by, or sponsored by Apple Inc. Apple Music and MusicKit are trademarks of Apple Inc.