PrivateFavoritesAPI

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

Bases: PrivateQobuzResourceAPI

Favorites 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

get_my_saved_item_ids

Get Qobuz IDs of the current user's favorites.

get_my_saved_items

Get Qobuz catalog information for the current user's favorites.

is_item_saved

Check whether the current user has an item favorited.

remove_saved_items

Unfavorite one or more albums, artists, and/or tracks.

save_items

Favorite one or more albums, artists, and/or tracks.

toggle_item_saved

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.

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: 1 to 500.

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.

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, or track_ids must 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, or track_ids must 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>}.