PrivateMixesAPI¶
- class minim.api.tidal.PrivateMixesAPI(client: APIClient, /)[source]¶
Bases:
PrivateTIDALResourceAPIMixes API endpoints for the private TIDAL API.
Important
This class is managed by
PrivateTIDALAPIClientand should not be instantiated directly.- Parameters:
- clientminim.api._shared.APIClient
API client instance used to make HTTP requests.
Methods
Add mixes to the current user's collection.
Get TIDAL catalog information for tracks in a mix.
Get the TIDAL page layout for a mix.
Get TIDAL IDs of the mixes in the current user's collection.
Get TIDAL catalog information for mixes in the current user's collection.
Get the TIDAL page layout for personalized mixes.
Remove mixes from the current user's collection.
- follow_mixes(mix_ids: str | Collection[str], /, *, on_missing: str | None = None) None[source]¶
Add mixes to the current user’s collection.
User authentication
- User authentication
Access and manage the user’s collection.
- Parameters:
- mix_idsstr or Collection[str]; positional-only
TIDAL IDs of the mixes.
Examples:
"000ec0b01da1ddd752ec5dee553d48""000ec0b01da1ddd752ec5dee553d48,000dd748ceabd5508947c6a5d3880a"["000ec0b01da1ddd752ec5dee553d48", "000dd748ceabd5508947c6a5d3880a"]
- on_missingstr; keyword-only; optional
Behavior when the mixes to be favorited cannot be found in the TIDAL catalog.
API default:
"FAIL".
- get_mix_items(mix_id: str, /, country_code: str | None = None) dict[str, Any][source]¶
Get TIDAL catalog information for tracks in a mix.
- Parameters:
- mix_idstr; positional-only
TIDAL ID of the mix.
Example:
"000ec0b01da1ddd752ec5dee553d48".- country_codestr; optional
ISO 3166-1 alpha-2 country code. If not provided, the country associated with the current user account or IP address is used.
Example:
"US".
- Returns:
- itemsdict[str, Any]
TIDAL metadata for the tracks in the mix.
Sample response
{ "items": [ { "item": { "accessType": <str>, "adSupportedStreamReady": <bool>, "album": { "cover": <str>, "id": <int>, "title": <str>, "vibrantColor": <str>, "videoCover": <str> }, "allowStreaming": <bool>, "artist": { "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": <str> }, "artists": [ { "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": <str> } ], "audioModes": <list[str]>, "audioQuality": <str>, "bpm": <int>, "copyright": <str>, "djReady": <bool>, "duration": <int>, "editable": <bool>, "explicit": <bool>, "id": <int>, "isrc": <str>, "key": <str>, "keyScale": <str>, "mediaMetadata": { "tags": <list[str]> }, "mixes": { "TRACK_MIX": <str> }, "payToStream": <bool>, "peak": <float>, "popularity": <int>, "premiumStreamingOnly": <bool>, "replayGain": <float>, "spotlighted": <bool>, "stemReady": <bool>, "streamReady": <bool>, "streamStartDate": <str>, "title": <str>, "trackNumber": <int>, "upload": <bool>, "url": <str>, "version": <str>, "volumeNumber": <int> }, "type": "track" } ], "limit": <int>, "offset": <int>, "totalNumberOfItems": <int> }
- get_mix_page(mix_id: str, /, country_code: str | None = None, *, device_type: str = 'BROWSER', locale: str | None = None) dict[str, Any][source]¶
Get the TIDAL page layout for a mix.
- Parameters:
- mix_idstr; positional-only
TIDAL ID of the mix.
Example:
"000ec0b01da1ddd752ec5dee553d48".- country_codestr; optional
ISO 3166-1 alpha-2 country code. If not provided, the country associated with the current user account or IP address is used.
Example:
"US".- device_typestr; keyword-only; default:
"BROWSER" Device type.
Valid values:
"BROWSER"– Web browser."DESKTOP"– Desktop TIDAL application."PHONE"– Mobile TIDAL application."TV"– Smart TV TIDAL application.
- localestr; keyword-only; optional
IETF BCP 47 language tag.
API default:
"en_US"– English (U.S.).
- Returns:
- pagedict[str, Any]
Layout for the mix page.
Sample response
{ "id": <str>, "rows": [ { "modules": [ { "description": <str>, "id": <str>, "mix": { "contentBehavior": <str>, "description": <str>, "descriptionColor": <str>, "detailImages": { "LARGE": { "height": <int>, "url": <str>, "width": <int> }, "MEDIUM": { "height": <int>, "url": <str>, "width": <int> }, "SMALL": { "height": <int>, "url": <str>, "width": <int> } }, "graphic": { "images": [ { "id": <str>, "type": "ARTIST", "vibrantColor": <str> } ], "text": <str>, "type": "SQUARES_GRID" }, "id": <str>, "images": { "LARGE": { "height": <int>, "url": <str>, "width": <int> }, "MEDIUM": { "height": <int>, "url": <str>, "width": <int> }, "SMALL": { "height": <int>, "url": <str>, "width": <int> } }, "master": <bool>, "mixNumber": <int>, "mixType": <str>, "sharingImages": <Any>, "shortSubtitle": <str>, "subTitle": <str>, "subTitleColor": <str>, "title": <str>, "titleColor": <str> }, "playbackControls": [ { "icon": <str>, "playbackMode": <str>, "shuffle": <bool>, "targetModuleId": <str>, "title": <str> } ], "preTitle":<str>, "title": <str>, "type": "MIX_HEADER", "width": <int> } ] }, { "modules": [ { "description": <str>, "id": <str>, "layout": <str>, "listFormat": <str>, "pagedList": { "dataApiPath": <str>, "items": [ { "accessType": <str>, "adSupportedStreamReady": <bool>, "album": { "cover": <str>, "id": <int>, "releaseDate": <str>, "title": <str>, "url": <str>, "vibrantColor": <str>, "videoCover": <str> }, "allowStreaming": <bool>, "artists": [ { "handle": <str>, "id": <int>, "name": <str>, "picture": <str>, "type": <str>, "userId": <int> } ], "audioModes": <list[str]>, "audioQuality": <str>, "djReady": <bool>, "doublePopularity": <float>, "duration": <int>, "editable": <bool>, "explicit": <bool>, "id": <int>, "mediaMetadata": { "tags": <list[str]> }, "mixes": { "TRACK_MIX": <str> }, "payToStream": <bool>, "popularity": <int>, "replayGain": <float>, "spotlighted": <bool>, "stemReady": <bool>, "streamReady": <bool>, "streamStartDate": <str>, "title": <str>, "trackNumber": <int>, "upload": <bool>, "url": <str>, "version": <str>, "volumeNumber": <int> } ], "limit": <int>, "offset": <int>, "totalNumberOfItems": <int> }, "preTitle": <str>, "quickPlay": <bool>, "scroll": <str>, "showMore": { "apiPath": <str>, "title": <str> }, "showTableHeaders": <bool>, "supportsPaging": <bool>, "title": <str>, "type": "TRACK_LIST", "width": <int> } ] } ], "selfLink": <str>, "title": <str> }
- get_my_followed_mix_ids(*, limit: int = 50, cursor: str | None = None) dict[str, Any][source]¶
Get TIDAL IDs of the mixes in the current user’s collection.
User authentication
- User authentication
Access and manage the user’s collection.
- Parameters:
- limitint; keyword-only; default:
50 Maximum number of mix IDs to return.
Valid range:
1to50.- cursorstr; keyword-only; optional
Cursor for fetching the next page of results.
- limitint; keyword-only; default:
- Returns:
- mix_idsdict[str, Any]
Page of TIDAL IDs of the mixes in the user’s collection.
Sample response:
{"content": <list[str]>, "cursor": <str>}
- get_my_followed_mixes(*, limit: int = 50, cursor: str | None = None) dict[str, Any][source]¶
Get TIDAL catalog information for mixes in the current user’s collection.
User authentication
- User authentication
Access and manage the user’s collection.
- Parameters:
- limitint; keyword-only; default:
50 Maximum number of mixes to return.
Valid range:
1to50.- cursorstr; keyword-only; optional
Cursor for fetching the next page of results.
- sort_bystr; keyword-only; optional
Field to sort the mixes by.
Valid values:
"DATE"- Date added."NAME"- Mix name.
API default:
"DATE".- descendingbool; keyword-only; optional
Whether to sort in descending order.
API default:
False.
- limitint; keyword-only; default:
- Returns:
- mixesdict[str, Any]
Page of TIDAL metadata for the mixes in the current user’s collection.
Sample response
{ "cursor": <str>, "items": [ { "dateAdded": <str>, "detailImages": { "LARGE": { "height": <int>, "url": <str>, "width": <int> }, "MEDIUM": { "height": <int>, "url": <str>, "width": <int> }, "SMALL": { "height": <int>, "url": <str>, "width": <int> } }, "id": <str>, "images": { "LARGE": { "height": <int>, "url": <str>, "width": <int> }, "MEDIUM": { "height": <int>, "url": <str>, "width": <int> }, "SMALL": { "height": <int>, "url": <str>, "width": <int> } }, "master": <bool>, "mixType": <str>, "subTitle": <str>, "subTitleTextInfo": { "color": <str>, "text": <str> }, "title": <str>, "titleTextInfo": { "color": <str>, "text": <str> }, "updated": <str> } ], "lastModifiedAt": <str> }
- get_personalized_mixes_page(country_code: str | None = None, *, device_type: str = 'BROWSER', locale: str | None = None) dict[str, Any][source]¶
Get the TIDAL page layout for personalized mixes.
- Parameters:
- country_codestr; optional
ISO 3166-1 alpha-2 country code. If not provided, the country associated with the current user account or IP address is used.
Example:
"US".- device_typestr; keyword-only; default:
"BROWSER" Device type.
Valid values:
"BROWSER"– Web browser."DESKTOP"– Desktop TIDAL application."PHONE"– Mobile TIDAL application."TV"– Smart TV TIDAL application.
- localestr; keyword-only; optional
IETF BCP 47 language tag.
API default:
"en_US"– English (U.S.).
- Returns:
- pagedict[str, Any]
Layout for the personalized mixes page.
Sample response
{ "id": <str>, "rows": [ { "modules": [ { "collapse": <bool>, "description": <str>, "icon": <str>, "id": <str>, "preTitle": <str>, "text":<str>, "title": <str>, "type": "TEXT_BLOCK", "width": <int> } ] } ], "selfLink": <str>, "title": <str> }
- unfollow_mixes(mix_ids: str | Collection[str], /) None[source]¶
Remove mixes from the current user’s collection.
User authentication
- User authentication
Access and manage the user’s collection.
- Parameters:
- mix_idsstr or Collection[str]; positional-only
TIDAL IDs of the mixes.
Examples:
"000ec0b01da1ddd752ec5dee553d48""000ec0b01da1ddd752ec5dee553d48,000dd748ceabd5508947c6a5d3880a"["000ec0b01da1ddd752ec5dee553d48", "000dd748ceabd5508947c6a5d3880a"]