PrivatePlaylistsAPI

class minim.api.qobuz.PrivatePlaylistsAPI(client: APIClient, /)[source]

Bases: PrivateQobuzResourceAPI

Playlists API endpoints for the private Qobuz API.

Important

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

Parameters:
clientminim.api._shared.APIClient

API client instance used to make HTTP requests.

Methods

add_playlist_tracks

Add tracks to a playlist.

available_playlist_tags

Available playlist tags.

create_playlist

Create a playlist.

delete_playlist

Delete a playlist.

follow_playlist

Favorite a playlist.

get_featured_playlists

Get Qobuz catalog information for featured playlists.

get_my_playlists

Get Qobuz catalog information for playlists created and/or favorited by the current user.

get_playlist

Get Qobuz catalog information for a playlist.

get_playlist_tags

Get Qobuz catalog information for available playlist tags.

remove_playlist_tracks

Remove tracks from a playlist.

reorder_playlist_items

Reorder items in a playlist.

reorder_playlists

Reorder playlists.

search_playlists

Search for playlists in the Qobuz catalog.

unfollow_playlist

Unfavorite a playlist.

update_playlist_details

Update the details of a playlist.

add_playlist_tracks(playlist_id: int | str, /, track_ids: int | str | Collection[int | str], *, allow_duplicates: bool | None = None) dict[str, Any][source]

Add tracks to a playlist.

User authentication

User authentication

Access and manage your library.

Parameters:
playlist_idint or str; positional-only

Qobuz ID of the playlist.

Examples: 2776610, "6754150".

track_idsint, str, or Collection[int | str]

Qobuz IDs of the tracks.

Examples: 23929516, "344521217", "23929516,344521217", [23929516, "344521217"].

allow_duplicatesbool; keyword-only; optional

Whether to allow duplicate tracks in the playlist.

API default: True.

Returns:
playlistdict[str, Any]

Qobuz metadata for the updated playlist.

available_playlist_tags() dict[str, dict[str, Any]][source]

Available playlist tags.

Note

Accessing this property may call get_playlist_tags() and make a request to the Qobuz API.

create_playlist(name: str, *, description: str | None = None, public: bool | None = None, collaborative: bool | None = None, from_album_id: str | None = None, from_track_ids: int | str | Collection[int | str] | None = None) dict[str, Any][source]

Create a playlist.

User authentication

User authentication

Access and manage your library.

Parameters:
namestr

Playlist name.

Example: "My New Playlist Title".

descriptionstr; keyword-only; optional

Playlist description.

publicbool; keyword-only; optional

Whether the playlist is displayed on the current user’s profile.

API default: True.

collaborativebool; keyword-only; optional

Whether other users can modify the playlist.

API default: False.

from_album_idstr; keyword-only; optional

Qobuz ID of the album to add tracks from.

Examples: "0075679933652", "aaxy9wirwgn2a".

from_track_idsint, str, or Collection[int | str]; keyword-only; optional

Qobuz IDs of the tracks to add.

Examples: 23929516, "344521217", "23929516,344521217", [23929516, "344521217"].

Returns:
playlistdict[str, Any]

Qobuz metadata for the newly created playlist.

delete_playlist(playlist_id: int | str, /) dict[str, Any][source]

Delete a playlist.

User authentication

User authentication

Access and manage your library.

Parameters:
playlist_idint or str; positional-only

Qobuz ID of the playlist.

Examples: 2776610, "6754150".

Returns:
statusdict[str, str]

Whether the playlist was deleted successfully.

Sample response: {"status": "success"}.

follow_playlist(playlist_id: int | str, /) dict[str, str][source]

Favorite a playlist.

User authentication

User authentication

Access and manage your library.

Parameters:
playlist_idint or str; positional-only

Qobuz ID of the playlist.

Examples: 2776610, "6754150".

Returns:
statusdict[str, str]

Whether the playlist was favorited successfully.

Sample response: {"status": "success"}.

Get Qobuz catalog information for featured playlists.

Parameters:
playlist_typestr; optional

Type of playlists to return.

Valid values:

  • "last-created" – Most recently created playlists.

  • "editor-picks" – Most recently created playlists by Qobuz.

genre_idsint, str, or Collection[int | str]; keyword-only; optional

Qobuz IDs of the genres used to filter the playlists to return.

Examples: 10, "64", "10,64", [10, "64"].

playlist_tag_slugsstr or Collection[str]; keyword-only; optional

Playlist tag slugs used to filter the playlists to return.

Examples: "hi-res", "artist,label", ["focus", "mood"].

See also

get_playlist_tags() – Get available playlist tag slugs.

limitint; keyword-only; optional

Maximum number of playlists to return.

Valid range: 1 to 500.

API default: 25.

offsetint; keyword-only; optional

Index of the first playlist to return. Use with limit to get the next batch of playlists.

Minimum value: 0.

API default: 0.

Returns:
playlistsdict[str, Any]

Page of Qobuz metadata for the featured playlists.

get_my_playlists(*, playlist_types: str | Collection[str] | None = None, limit: int | None = None, offset: int | None = None, sort_by: str | None = None, descending: bool | None = None) dict[str, Any][source]

Get Qobuz catalog information for playlists created and/or favorited by the current user.

User authentication

User authentication

Access and manage your library.

Parameters:
playlist_typesstr or Collection[str]; keyword-only; optional

Playlist types to return.

Valid values:

  • "owner" – Playlists created by the user.

  • "subscriber" – Playlists favorited by the user.

Examples: "owner", "owner,subscriber", ["owner", "subscriber"].

API default: "owner,subscriber".

limitint; keyword-only; optional

Maximum number of playlists to return.

Valid range: 1 to 500.

API default: 500.

offsetint; keyword-only; optional

Index of the first playlist to return. Use with limit to get the next batch of playlists.

Minimum value: 0.

API default: 0.

sort_bystr, keyword-only, optional

Field to sort the playlists by.

Valid values: "updated_at", "position".

API default: "position".

descendingbool, keyword-only, optional

Whether to sort in descending order.

API default: True.

Returns:
playlistsdict[str, Any]

Page of Qobuz metadata for the playlists in the current user’s collection.

get_playlist(playlist_id: int | str, /, *, expand: str | Collection[str] | None = None, limit: int | None = None, offset: int | None = None) dict[str, Any][source]

Get Qobuz catalog information for a playlist.

Parameters:
playlist_idint or str; positional-only

Qobuz ID of the playlist.

Examples: 2776610, "6754150".

expandstr or Collection[str]; keyword-only; optional

Related resources to include metadata for in the response.

Valid values: "tracks", "getSimilarPlaylists", "focus", "focusAll".

Examples: "getSimilarPlaylists", "focus,focusAll", ["focus", "focusAll"].

limitint; keyword-only; optional

Maximum number of tracks to return when "tracks" is included in the expand parameter.

Valid range: 1 to 500.

API default: 50.

offsetint; keyword-only; optional

Index of the first track to return when "tracks" is included in the expand parameter. Use with limit to get the next batch of tracks.

Minimum value: 0.

API default: 0.

Returns:
playlistdict[str, Any]

Qobuz metadata for the playlist.

get_playlist_tags() dict[str, list[dict[str, Any]]][source]

Get Qobuz catalog information for available playlist tags.

Returns:
playlist_tagsdict[str, list[dict[str, Any]]]

Qobuz metadata for playlist tags.

remove_playlist_tracks(playlist_id: int | str, /, playlist_track_ids: int | str | Collection[int | str]) dict[str, Any][source]

Remove tracks from a playlist.

User authentication

User authentication

Access and manage your library.

Parameters:
playlist_idint or str; positional-only

Qobuz ID of the playlist.

Examples: 2776610, "6754150".

playlist_track_idsint, str, or Collection[int | str]

Playlist track IDs of the tracks to remove.

Examples: 3775131234, "3775131243", "3775131234,3775131243", [3775131234, "3775131243"].

See also

get_playlist() – Get playlist track IDs by including "tracks" in the expand parameter.

Returns:
playlistdict[str, Any]

Qobuz metadata for the updated playlist.

reorder_playlist_items(playlist_id: int | str, /, playlist_track_ids: int | str | Collection[int | str], to_index: int) dict[str, Any][source]

Reorder items in a playlist.

User authentication

User authentication

Access and manage your library.

Parameters:
playlist_idint or str; positional-only

Qobuz ID of the playlist.

Examples: 2776610, "6754150".

playlist_track_idsint, str, or Collection[int | str]

Playlist track IDs of the tracks to be reordered.

Examples: 3775131234, "3775131243", "3775131234,3775131243", [3775131234, "3775131243"].

See also

get_playlist() – Get playlist track IDs by including "tracks" in the expand parameter.

to_indexint

Zero-based index at which to insert the items.

Returns:
playlistdict[str, Any]

Qobuz metadata for the reordered playlist.

reorder_playlists(playlist_ids: int | str | Collection[int | str], /) dict[str, str][source]

Reorder playlists.

User authentication

User authentication

Access and manage your library.

Parameters:
playlist_idsint, str, or Collection[int | str]; positional-only

Qobuz IDs of the playlists.

Examples: 2776610, "6754150", "2776610,6754150", [2776610, "6754150"].

Returns:
statusdict[str, str]

Whether the playlists were reordered successfully.

Sample response: {"status": "success"}.

search_playlists(query: str, /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]

Search for playlists in the Qobuz catalog.

Parameters:
querystr; positional-only

Search query.

Tip

Searches can be narrowed using tags, such as #ByMainArtist, #ByComposer, #ByPerformer, #ByReleaseName, #ByLabel, #NewRelease, and #HiRes.

Use strict matching instead of fuzzy search by wrapping the keyword string in double quotes.

Example: "Galantis" #ByMainArtist #HiRes.

limitint; keyword-only; optional

Maximum number of playlists to return.

Valid range: 1 to 500.

API default: 50.

offsetint; keyword-only; optional

Index of the first playlist to return. Use with limit to get the next batch of playlists.

Minimum value: 0.

API default: 0.

Returns:
playlistsdict[str, Any]

Page of Qobuz metadata for the matching playlists.

unfollow_playlist(playlist_id: int | str, /) dict[str, str][source]

Unfavorite a playlist.

User authentication

User authentication

Access and manage your library.

Parameters:
playlist_idint or str; positional-only

Qobuz ID of the playlist.

Examples: 2776610, "6754150".

Returns:
statusdict[str, str]

Whether the playlist was unfavorited successfully.

Sample response: {"status": "success"}.

update_playlist_details(playlist_id: str, /, *, name: str | None = None, description: str | None = None, public: bool | None = None, collaborative: bool | None = None, track_ids: str | Collection[str] | None = None) dict[str, Any][source]

Update the details of a playlist.

User authentication

User authentication

Access and manage your library.

Important

At least one of name, description, public, collaborative, or track_ids must be specified.

Parameters:
namestr

Playlist name.

Example: "My New Playlist Title".

descriptionstr; keyword-only; optional

Playlist description.

publicbool; keyword-only; optional

Whether the playlist is displayed on the current user’s profile.

collaborativebool; keyword-only; optional

Whether other users can modify the playlist.

track_idsint, str, or Collection[int | str]; keyword-only; optional

Qobuz IDs of the tracks to replace those currently in the playlist.

Examples: 23929516, "344521217", "23929516,344521217", [23929516, "344521217"].

Returns:
playlistdict[str, Any]

Qobuz metadata for the updated playlist.