PrivatePlaylistsAPI¶
- class minim.api.qobuz.PrivatePlaylistsAPI(client: APIClient, /)[source]¶
Bases:
PrivateQobuzResourceAPIPlaylists API endpoints for the private Qobuz API.
Important
This class is managed by
PrivateQobuzAPIClientand should not be instantiated directly.- Parameters:
- clientminim.api._shared.APIClient
API client instance used to make HTTP requests.
Methods
Add tracks to a playlist.
Available playlist tags.
Create a playlist.
Delete a playlist.
Favorite a playlist.
Get Qobuz catalog information for featured playlists.
Get Qobuz catalog information for playlists created and/or favorited by the current user.
Get Qobuz catalog information for a playlist.
Get Qobuz catalog information for available playlist tags.
Remove tracks from a playlist.
Reorder items in a playlist.
Reorder playlists.
Search for playlists in the Qobuz catalog.
Unfavorite a playlist.
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.
Sample response
{ "created_at": <int>, "description": <str>, "duration": <int>, "id": <int>, "is_collaborative": <bool>, "is_public": <bool>, "name": <str>, "owner": { "id": <int>, "name": <str> }, "public_at": <int>, "tracks_count": <int>, "updated_at": <int>, "users_count": <int> }
- 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.
Sample response
{ "created_at": <int>, "description": <str>, "duration": <int>, "id": <int>, "is_collaborative": <bool>, "is_public": <bool>, "name": <str>, "owner": { "id": <int>, "name": <str> }, "public_at": <int>, "tracks_count": <int>, "updated_at": <int>, "users_count": <int> }
- 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_featured_playlists(playlist_type: str, *, genre_ids: int | str | Collection[int | str] | None = None, playlist_tag_slugs: str | Collection[str] | None = None, limit: int | None = None, offset: int | None = None) dict[str, Any][source]¶
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:
1to500.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.
Sample response
{ "playlists": { "items": [ { "created_at": <int>, "description": <str>, "duration": <int>, "featured_artists": [], "genres": [ { "color": <str>, "id": <int>, "name": <str>, "path": <list[int]>, "percent": <int>, "slug": <str> } ], "id": <int>, "image_rectangle": <list[str]>, "image_rectangle_mini": <list[str]>, "images": <list[str]>, "images150": <list[str]>, "images300": <list[str]>, "is_collaborative": <bool>, "is_featured": <bool>, "is_public": <bool>, "name": <str>, "owner": { "id": <int>, "name": <str> }, "public_at": <int>, "slug": <str>, "stores": <list[str]>, "tags": [ { "color": <str>, "featured_tag_id": <str>, "genre_tag": { "genre_id": <str>, "name": <str> }, "is_discover": <bool>, "name_json": <str>, "slug": <str> } ], "tracks_count": <int>, "updated_at": <int>, "users_count": <int> } ], "limit": <int>, "offset": <int>, "total": <int> } }
- 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:
1to500.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.
Sample response
{ "playlists": { "items": [ { "created_at": <int>, "description": <str>, "duration": <int>, "featured_artists": [], "genres": [ { "color": <str>, "id": <int>, "name": <str>, "path": <list[int]>, "percent": <int>, "slug": <str> } ], "id": <int>, "image_rectangle": <list[str]>, "image_rectangle_mini": <list[str]>, "images": <list[str]>, "images150": <list[str]>, "images300": <list[str]>, "indexed_at": <int>, "is_collaborative": <bool>, "is_featured": <bool>, "is_public": <bool>, "is_published": <bool>, "name": <str>, "owner": { "id": <int>, "name": <str> }, "position": <int>, "public_at": <int>, "published_from": <int>, "published_to": <int>, "slug": <str>, "stores": <list[str]>, "subscribed_at": <int>, "timestamp_position": <int>, "tracks_count": <int>, "updated_at": <int>, "users_count": <int> } ], "limit": <int>, "offset": <int>, "total": <int> }, "user": { "id": <int>, "login": <str> } }
- 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.
User authentication
- User authentication
Access and manage your library.
- 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:
1to500.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.
Sample response
{ "created_at": <int>, "description": <str>, "duration": <int>, "featured_artists": [], "genres": [ { "color": <str>, "id": <int>, "name": <str>, "path": <list[int]>, "percent": <int>, "slug": <str> } ], "id": <int>, "image_rectangle": <list[str]>, "image_rectangle_mini": <list[str]>, "images": <list[str]>, "images150": <list[str]>, "images300": <list[str]>, "is_collaborative": <bool>, "is_featured": <bool>, "is_public": <bool>, "items_focus": None, "name": <str>, "owner": { "id": <int>, "name": <str> }, "public_at": <int>, "similarPlaylist": { "items": [ { "created_at": <int>, "description": <str>, "duration": <int>, "featured_artists": [], "genres": [ { "id": <int>, "name": <str>, "path": <list[int]>, "slug": <str> } ], "id": <int>, "image_rectangle": <list[str]>, "image_rectangle_mini": <list[str]>, "images": <list[str]>, "images150": <list[str]>, "images300": <list[str]>, "indexed_at": <int>, "is_collaborative": <bool>, "is_featured": <bool>, "is_public": <bool>, "name": <str>, "owner": { "id": <int>, "name": <str> }, "public_at": <int>, "slug": <str>, "stores": <list[str]>, "tags": [ { "featured_tag_id": <str>, "genre_tag": { "genre_id": <str>, "name": <str> }, "is_discover": <bool>, "name_json": <str>, "slug": <str> } ], "tracks_count": <int>, "updated_at": <int>, "users_count": <int> } ], "limit": <int>, "offset": <int>, "total": <int> }, "slug": <str>, "stores": <list[str]>, "tags": [ { "color": <str>, "featured_tag_id": <str>, "genre_tag": { "genre_id": <str>, "name": <str> }, "is_discover": <bool>, "name_json": <str>, "slug": <str> } ], "timestamp_position": <int>, "tracks": { "items": [ { "album": { "artist": { "albums_count": <int>, "id": <int>, "image": None, "name": <str>, "picture": None, "slug": <str> }, "displayable": <bool>, "downloadable": <bool>, "duration": <int>, "genre": { "color": <str>, "id": <int>, "name": <str>, "path": <list[int]>, "slug": <str> }, "hires": <bool>, "hires_streamable": <bool>, "id": <str>, "image": { "large": <str>, "small": <str>, "thumbnail": <str> }, "label": { "albums_count": <int>, "id": <int>, "name": <str>, "slug": <str>, "supplier_id": <int> }, "maximum_bit_depth": <int>, "maximum_channel_count": <int>, "maximum_sampling_rate": <float>, "maximum_technical_specifications": <str>, "media_count": <int>, "parental_warning": <bool>, "popularity": <int>, "previewable": <bool>, "purchasable": <bool>, "purchasable_at": <str>, "qobuz_id": <int>, "release_date_download": <str>, "release_date_original": <str>, "release_date_purchase": <str>, "release_date_stream": <str>, "released_at": <int>, "sampleable": <bool>, "streamable": <bool>, "streamable_at": <int>, "title": <str>, "tracks_count": <int>, "upc": <str>, "version": <str> }, "audio_info": { "replaygain_track_gain": <float>, "replaygain_track_peak": <float> }, "composer": { "id": <int>, "name": <str> }, "copyright": <str>, "created_at": <int>, "displayable": <bool>, "downloadable": <bool>, "duration": <int>, "hires": <bool>, "hires_streamable": <bool>, "id": <int>, "isrc": <str>, "maximum_bit_depth": <int>, "maximum_channel_count": <int>, "maximum_sampling_rate": <float>, "maximum_technical_specifications": <str>, "media_number": <int>, "parental_warning": <bool>, "performer": { "id": <int>, "name": <str> }, "performers": <str>, "playlist_track_id": <int>, "position": <int>, "previewable": <bool>, "purchasable": <bool>, "purchasable_at": <int>, "release_date_download": <str>, "release_date_original": <str>, "release_date_purchase": <str>, "release_date_stream": <str>, "sampleable": <bool>, "streamable": <bool>, "streamable_at": <int>, "title": <str>, "track_number": <int>, "version": <str>, "work": <str> } ], "limit": <int>, "offset": <int>, "total": <int> }, "tracks_count": <int>, "updated_at": <int>, "users_count": <int> }
- 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.
Sample response
{ "tags": [ { "color": <str>, "featured_tag_id": <str>, "genre_tag": None, "is_discover": <str>, "name_json": <str>, "position": <str>, "slug": <str> } ] }
- 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.
Sample response
{ "created_at": <int>, "description": <str>, "duration": <int>, "id": <int>, "is_collaborative": <bool>, "is_public": <bool>, "name": <str>, "owner": { "id": <int>, "name": <str> }, "public_at": <int>, "status": "success", "tracks_count": <int>, "updated_at": <int>, "users_count": <int> }
- 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.
Sample response
{ "created_at": <int>, "description": <str>, "duration": <int>, "id": <int>, "is_collaborative": <bool>, "is_public": <bool>, "name": <str>, "owner": { "id": <int>, "name": <str> }, "public_at": <int>, "tracks_count": <int>, "updated_at": <int>, "users_count": <int> }
- 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:
1to500.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.
Sample response
{ "playlists": { "items": [ { "created_at": <int>, "description": <str>, "duration": <int>, "featured_artists": [ { "albums_count": <int>, "id": <int>, "image": None, "name": <str>, "picture": None, "slug": <str> } ], "genres": [ { "color": <str>, "id": <int>, "name": <str>, "path": <list[int]>, "percent": <int>, "slug": <str> } ], "id": <int>, "image_rectangle": <list[str]>, "image_rectangle_mini": <list[str]>, "images": <list[str]>, "images150": <list[str]>, "images300": <list[str]>, "indexed_at": <int>, "is_collaborative": <bool>, "is_featured": <bool>, "is_public": <bool>, "is_published": <bool>, "name": <str>, "owner": { "id": <int>, "name": <str> }, "public_at": <int>, "published_from": <int>, "published_to": <int>, "slug": <str>, "stores": <list[str]>, "tags": [ { "color": <str>, "featured_tag_id": <str>, "genre_tag": { "genre_id": <str>, "name": <str> }, "is_discover": <bool>, "name_json": <str>, "slug": <str> } ], "timestamp_position": <int>, "tracks_count": <int>, "updated_at": <int>, "users_count": <int> } ], "limit": <int>, "offset": <int>, "total": <int> }, "query": <str> }
- 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, ortrack_idsmust 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.
Sample response
{ "created_at": <int>, "description": <str>, "duration": <int>, "id": <int>, "is_collaborative": <bool>, "is_public": <bool>, "name": <str>, "owner": { "id": <int>, "name": <str> }, "public_at": <int>, "tracks_count": <int>, "updated_at": <int>, "users_count": <int> }