PrivateFavoritesAPI¶
- class minim.api.qobuz.PrivateFavoritesAPI(client: APIClient, /)[source]¶
Bases:
PrivateQobuzResourceAPIFavorites 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
Get Qobuz IDs of the current user's favorites.
Get Qobuz catalog information for the current user's favorites.
Check whether the current user has an item favorited.
Unfavorite one or more albums, artists, and/or tracks.
Favorite one or more albums, artists, and/or tracks.
Toggle the favorite status of an item.
- get_my_saved_item_ids() dict[str, Any][source]¶
Get Qobuz IDs of the current user’s favorites.
User authentication
- User authentication
Access and manage your library.
- Returns:
- saved_idsdict[str, Any]
Qobuz IDs of the current user’s favorites.
Sample response
{ "albums": <list[str]>, "articles": [], "artists": <list[int]>, "awards": [], "labels": [], "tracks": <list[int]>, }
- get_my_saved_items(item_type: str | None = None, /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]¶
Get Qobuz catalog information for the current user’s favorites.
User authentication
- User authentication
Access and manage your library.
- Parameters:
- item_typestr; positional-only; optional
Type of item to return. If not specified, favorites of all types are returned.
Valid values:
"albums","articles","artists","awards","labels","tracks".- limitint; keyword-only; optional
Maximum number of items to return.
Valid range:
1to500.API default:
50.- offsetint; keyword-only; optional
Index of the first item to return. Use with limit to get the next batch of items.
Minimum value:
0.API default:
0.
- Returns:
- itemsdict[str, Any]
Page of Qobuz metadata for the current user’s favorites.
Sample response
{ "albums": { "items": [ { "articles": [], "artist": { "albums_count": <int>, "id": <int>, "image": None, "name": <str>, "picture": None, "slug": <str>, }, "artists": [ { "id": <int>, "name": <str>, "roles": <list[str]> } ], "displayable": <bool>, "downloadable": <bool>, "duration": <int>, "favorited_at": <int>, "genre": { "color": <str>, "id": <int>, "name": <str>, "path": <list[int]>, "slug": <str> }, "hires": <bool>, "hires_streamable": <bool>, "id": <str>, "image": { "back": None, "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>, "media_count": <int>, "parental_warning": <bool>, "popularity": <int>, "previewable": <bool>, "purchasable": <bool>, "purchasable_at": <int>, "qobuz_id": <int>, "release_date_download": <str>, "release_date_original": <str>, "release_date_stream": <str>, "released_at": <int>, "sampleable": <bool>, "slug": <str>, "streamable": <bool>, "streamable_at": <int>, "title": <str>, "tracks_count": <int>, "upc": <str>, "url": <str>, "version": <str> } ], "limit": <int>, "offset": <int>, "total": <int> }, "artists": { "items": [ { "albums_count": <int>, "favorited_at": <int>, "id": <int>, "image": { "extralarge": <str>, "large": <str>, "medium": <str>, "mega": <str>, "small": <str>, }, "name": <str>, "slug": <str> } ], "limit": <int>, "offset": <int>, "total": <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": { "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>, "media_count": <int>, "parental_warning": <bool>, "previewable": <bool>, "purchasable": <bool>, "purchasable_at": null, "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": None }, "audio_info": { "replaygain_track_gain": <float>, "replaygain_track_peak": <float>, }, "composer": { "id": <int>, "name": <str> }, "copyright": <str>, "displayable": <bool>, "downloadable": <bool>, "duration": <int>, "favorited_at": <int>, "hires": <bool>, "hires_streamable": <bool>, "id": <int>, "isrc": <str>, "maximum_bit_depth": <int>, "maximum_channel_count": <int>, "maximum_sampling_rate": <float>, "media_number": <int>, "parental_warning": <bool>, "performer": { "id": <int>, "name": <str> }, "performers": <str>, "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": None } ], "limit": <int>, "offset": <int>, "total": <int> }, "user": { "id": <int>, "login": <str> } }
- is_item_saved(item_type: str, item_id: int | str, /) dict[str, bool][source]¶
Check whether the current user has an item favorited.
User authentication
- User authentication
Access and manage your library.
- Parameters:
- item_typestr; positional-only
Type of item.
Valid values:
"album","artist","article","award","label","track".- item_idint or str; positional-only
Qobuz ID of the item.
- Returns:
- saveddict[str, bool]
Whether the current user has the item favorited.
Sample response:
{"status": <bool>}.
- remove_saved_items(*, album_ids: str | Collection[str] | None = None, artist_ids: int | str | Collection[int | str] | None = None, track_ids: int | str | Collection[int | str] | None = None) dict[str, str][source]¶
Unfavorite one or more albums, artists, and/or tracks.
User authentication
- User authentication
Access and manage your library.
Important
At least one of
album_ids,artist_ids, ortrack_idsmust be specified.- Parameters:
- album_idsstr or Collection[str]; keyword-only; optional
Qobuz IDs of the albums.
Examples:
"0075679933652","0075679933652,aaxy9wirwgn2a".- artist_idsint, str, or Collection[int | str]; keyword-only; optional
Qobuz IDs of the artists.
Examples:
865362,"21473137","865362,21473137",[865362, "21473137"].- track_idsint, str, or Collection[int | str]; keyword-only; optional
Qobuz IDs of the tracks.
Examples:
23929516,"344521217","23929516,344521217",[23929516, "344521217"].
- Returns:
- statusdict[str, str]
Whether the items were unfavorited successfully.
Sample response:
{"status": "success"}.
- save_items(*, album_ids: str | Collection[str] | None = None, artist_ids: int | str | Collection[int | str] | None = None, track_ids: int | str | Collection[int | str] | None = None) dict[str, str][source]¶
Favorite one or more albums, artists, and/or tracks.
User authentication
- User authentication
Access and manage your library.
Important
At least one of
album_ids,artist_ids, ortrack_idsmust be specified.- Parameters:
- album_idsstr or Collection[str]; keyword-only; optional
Qobuz IDs of the albums.
Examples:
"0075679933652","0075679933652,aaxy9wirwgn2a".- artist_idsint, str, or Collection[int | str]; keyword-only; optional
Qobuz IDs of the artists.
Examples:
865362,"21473137","865362,21473137",[865362, "21473137"].- track_idsint, str, or Collection[int | str]; keyword-only; optional
Qobuz IDs of the tracks.
Examples:
23929516,"344521217","23929516,344521217",[23929516, "344521217"].
- Returns:
- statusdict[str, str]
Whether the items were favorited successfully.
Sample response:
{"status": "success"}.
- toggle_item_saved(item_type: str, item_id: int | str, /) dict[str, bool][source]¶
Toggle the favorite status of an item.
User authentication
- User authentication
Access and manage your library.
- Parameters:
- item_typestr; positional-only
Type of item.
Valid values:
"album","artist","article","award","label","track".- item_idint or str; positional-only
Qobuz ID of the item.
- Returns:
- saveddict[str, bool]
Whether the item is now favorited.
Sample response:
{"status": <bool>}.