LibraryAPI

class minim.api.spotify.LibraryAPI(client: APIClient, /)[source]

Bases: SpotifyResourceAPI

Library API endpoints for the Spotify Web API.

Important

This class is managed by SpotifyWebAPIClient and should not be instantiated directly.

Parameters:
clientminim.api._shared.APIClient

API client instance used to make HTTP requests.

Methods

are_items_saved

Library > Check User's Saved Items: Check whether one or more items are saved in the current user's library.

remove_saved_items

Library > Remove Items from Library: Remove one or more items from the current user's library.

save_items

Library > Save Items to Library: Save one or more items to the current user's library.

are_items_saved(spotify_uris: str | Collection[str], /) list[bool][source]

Library > Check User’s Saved Items: Check whether one or more items are saved in the current user’s library.

Authorization scopes

user-library-read scope

Access your saved content. Learn more.

user-follow-read scope

Access your followers and who you are following. Learn more.

playlist-read-private scope

Access your private playlists. Learn more.

Parameters:
spotify_urisstr or Collection[str]; positional-only

Comma-separated string or collection of Spotify URIs. A maximum of 40 URIs can be sent in a request.

Returns:
savedlist[bool]

Whether the current user has the specified albums saved in their library.

remove_saved_items(spotify_uris: str | Collection[str], /) None[source]

Library > Remove Items from Library: Remove one or more items from the current user’s library.

Authorization scopes

user-library-modify scope

Manage your saved content. Learn more.

user-follow-modify scope

Manage your saved content. Learn more.

playlist-modify-public scope

Manage your public playlists. Learn more.

Parameters:
spotify_urisstr or Collection[str]; positional-only

Comma-separated string or collection of Spotify URIs. A maximum of 40 URIs can be sent in a request.

save_items(spotify_uris: str | Collection[str], /) None[source]

Library > Save Items to Library: Save one or more items to the current user’s library.

Authorization scopes

user-library-modify scope

Manage your saved content. Learn more.

user-follow-modify scope

Manage your saved content. Learn more.

playlist-modify-public scope

Manage your public playlists. Learn more.

Parameters:
spotify_urisstr or Collection[str]; positional-only

Comma-separated string or collection of Spotify URIs. A maximum of 40 URIs can be sent in a request.