RadiosAPI¶
- class minim.api.deezer.RadiosAPI(client: APIClient, /)[source]¶
Bases:
DeezerResourceAPIRadios API endpoints for the Deezer API.
Important
This class is managed by
DeezerAPIClientand should not be instantiated directly.- Parameters:
- clientminim.api._shared.APIClient
API client instance used to make HTTP requests.
Methods
Radio: Get Deezer catalog information for a radio.
Radio > Genres: Get Deezer catalog information for radios, grouped by their genre IDs.
Radio > Tracks: Get Deezer catalog information for the tracks in a radio.
Radio > Lists: Get Deezer catalog information for all genres' radios.
Radio > Top: Get Deezer catalog information for the top radios on Deezer.
User > Radios: Get Deezer catalog information for a user's favorite radios.
User > Recommendations > Radios: Get Discogs catalog information for radios recommended for a user.
User > Radios: Unfavorite a radio.
User > Radios: Favorite a radio.
- get_radio(radio_id: int | str, /) dict[str, Any][source]¶
Radio: Get Deezer catalog information for a radio.
- Parameters:
- radio_idint or str; positional-only
Deezer ID of the radio.
Examples:
31061,"37151".
- Returns:
- radiodict[str, Any]
Deezer metadata for the radio.
Sample response
{ "description": <str>, "id": <int>, "md5_image": <str>, "picture": <str>, "picture_big": <str>, "picture_medium": <str>, "picture_small": <str>, "picture_xl": <str>, "share": <str>, "title": <str>, "tracklist": <str>, "type": "radio" }
- get_radio_groups() dict[str, Any][source]¶
Radio > Genres: Get Deezer catalog information for radios, grouped by their genre IDs.
- Returns:
- radiosdict[str, Any]
Deezer metadata for the grouped radios.
Sample response
{ "data": [ { "id": <int>, "radios": [ { "id": <int>, "md5_image": <str>, "picture": <str>, "picture_big": <str>, "picture_medium": <str>, "picture_small": <str>, "picture_xl": <str>, "title": <str>, "tracklist": <str>, "type": "radio" } ], "title": <str> } ] }
- get_radio_tracks(radio_id: int | str, /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]¶
Radio > Tracks: Get Deezer catalog information for the tracks in a radio.
- Parameters:
- radio_idint or str; positional-only
Deezer ID of the radio.
Examples:
31061,"37151".- limitint; keyword-only; optional
Maximum number of tracks to return.
Minimum value:
1.API default:
40.- offsetint; keyword-only; optional
Index of the first track to return. Use with limit to get the next batch of tracks.
Minimum value:
0.API default:
0.
- Returns:
- tracksdict[str, Any]
Page of Deezer metadata for the radio’s tracks.
Sample response
{ "data": [ { "album": { "cover": <str>, "cover_big": <str>, "cover_medium": <str>, "cover_small": <str>, "cover_xl": <str>, "id": <int>, "md5_image": <str>, "title": <str>, "tracklist": <str>, "type": "album" }, "artist": { "id": <int>, "link": <str>, "name": <str>, "picture": <str>, "picture_big": <str>, "picture_medium": <str>, "picture_small": <str>, "picture_xl": <str>, "tracklist": <str>, "type": "artist" }, "duration": <int>, "explicit_content_cover": <int>, "explicit_content_lyrics": <int>, "explicit_lyrics": false, "id": <int>, "link": <str>, "md5_image": <str>, "preview": <str>, "rank": <int>, "readable": <bool>, "title": <str>, "title_short": <str>, "title_version": <str>, "type": "track" } ] }
- get_radios(*, limit: int | None = None, offset: int | None = None) dict[str, Any][source]¶
Radio > Lists: Get Deezer catalog information for all genres’ radios.
- Parameters:
- limitint; keyword-only; optional
Maximum number of radios to return.
Minimum value:
1.API default:
25.- offsetint; keyword-only; optional
Index of the first radio to return. Use with limit to get the next batch of radios.
Minimum value:
0.API default:
0.
- Returns:
- radiosdict[str, Any]
Page of Deezer metadata for all genres’ radios.
Sample response
{ "data": [ { "id": <int>, "md5_image": <str>, "picture": <str>, "picture_big": <str>, "picture_medium": <str>, "picture_small": <str>, "picture_xl": <str>, "title": <str>, "tracklist": <str>, "type": "radio" } ], "next": <str>, "prev": <str>, "total": <int> }
- get_top_radios(*, limit: int | None = None, offset: int | None = None) dict[str, Any][source]¶
Radio > Top: Get Deezer catalog information for the top radios on Deezer.
- Parameters:
- limitint; keyword-only; optional
Maximum number of radios to return.
Minimum value:
1.API default:
25.- offsetint; keyword-only; optional
Index of the first radio to return. Use with limit to get the next batch of radios.
Minimum value:
0.API default:
0.
- Returns:
- radiosdict[str, Any]
Page of Deezer metadata for the top radios.
- get_user_followed_radios(user_id: int | str = 'me', /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]¶
User > Radios: Get Deezer catalog information for a user’s favorite radios.
User authentication
- User authentication
Access the user’s favorite items, playlists, and followed people.
- Parameters:
- user_idint or str; positional-only; default:
"me" Deezer ID of the user. If authenticated,
"me"can be used in lieu of a Deezer ID for the current user.Example:
5395005364,"5395005364","me".- limitint; keyword-only; optional
Maximum number of radios to return.
Minimum value:
1.- offsetint; keyword-only; optional
Index of the first radio to return. Use with limit to get the next batch of radios.
Minimum value:
0.API default:
0.
- user_idint or str; positional-only; default:
- Returns:
- radiosdict[str, Any]
Page of Deezer metadata for the user’s favorite radios.
Sample response
{ "checksum": <str>, "data": [], "next": <str>, "prev": <str>, "total": <int> }
- get_user_radio_recommendations(user_id: int | str = 'me', /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]¶
User > Recommendations > Radios: Get Discogs catalog information for radios recommended for a user.
User authentication
- User authentication
Access the user’s favorite items, playlists, and followed people.
- Parameters:
- user_idint or str; positional-only; default:
"me" Deezer ID of the user. If authenticated,
"me"can be used in lieu of a Deezer ID for the current user.Example:
5395005364,"5395005364","me".- limitint; keyword-only; optional
Maximum number of radios to return.
Minimum value:
1.- offsetint; keyword-only; optional
Index of the first radio to return. Use with limit to get the next batch of radios.
Minimum value:
0.API default:
0.
- user_idint or str; positional-only; default:
- Returns:
- radiosdict[str, Any]
Page of Deezer metadata for the recommended radios.
Sample response
{ "data": [ { "id": <int>, "md5_image": <str>, "picture": <str>, "picture_big": <str>, "picture_medium": <str>, "picture_small": <str>, "picture_xl": <str>, "timestamp": <int>, "title": <str>, "tracklist": <str>, "type": "radio" } ], "next": <str>, "prev": <str>, "total": <int> }
- remove_saved_radio(radio_id: int | str, /, *, user_id: int | str = 'me') bool[source]¶
User > Radios: Unfavorite a radio.
Permissions
manage_librarypermissionManage a user’s library. Learn more.
delete_librarypermissionDelete items from a user’s library. Learn more.
- Parameters:
- radio_idint or str; positional-only
Deezer ID of the radio.
Examples:
31061,"37151".- user_idint or str; keyword-only; default:
"me" Deezer ID of the user. If authenticated,
"me"can be used in lieu of a Deezer ID for the current user.Example:
5395005364,"5395005364","me".
- Returns:
- successbool
Whether the radio was unfavorited successfully.
- save_radio(radio_id: int | str, /, *, user_id: int | str = 'me') bool[source]¶
User > Radios: Favorite a radio.
Permission
manage_librarypermissionManage a user’s library. Learn more.
- Parameters:
- radio_idint or str; positional-only
Deezer ID of the radio.
Examples:
31061,"37151".- user_idint or str; keyword-only; default:
"me" Deezer ID of the user. If authenticated,
"me"can be used in lieu of a Deezer ID for the current user.Example:
5395005364,"5395005364","me".
- Returns:
- successbool
Whether the radio was favorited successfully.