GenresAPI¶
- class minim.api.deezer.GenresAPI(client: APIClient, /)[source]¶
Bases:
DeezerResourceAPIGenres 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
Genre: Get Deezer catalog information for a genre or all available genres.
Genre > Artists: Get Deezer catalog information for artists primarily associated with a genre.
Genre > Podcasts: Get Deezer catalog information for podcasts primarily associated with a genre.
Genre > Radios: Get Deezer catalog information for radios primarily associated with a genre.
- get_genre(genre_id: int | str | None = None, /) dict[str, Any][source]¶
Genre: Get Deezer catalog information for a genre or all available genres.
- Parameters:
- genre_idint, str, or None; positional-only; optional
Deezer ID of the genre. If
None, all available genres are returned.Examples:
0,"2".
- Returns:
- genredict[str, Any]
Deezer metadata for the specified genre or all available genres.
Sample response
{ "id": <int>, "name": <str>, "picture": <str>, "picture_big": <str>, "picture_medium": <str>, "picture_small": <str>, "picture_xl": <str>, "type": "genre" }
{ "data": [ { "id": <int>, "name": <str>, "picture": <str>, "picture_big": <str>, "picture_medium": <str>, "picture_small": <str>, "picture_xl": <str>, "type": "genre" } ] }
- get_genre_artists(genre_id: int | str = 0, /) dict[str, Any][source]¶
Genre > Artists: Get Deezer catalog information for artists primarily associated with a genre.
- Parameters:
- genre_idint or str; positional-only; default:
0 Deezer ID of the genre.
Examples:
0,"2".
- genre_idint or str; positional-only; default:
- Returns:
- artistsdict[str, Any]
Deezer metadata for the artists associated with the genre.
Sample response
{ "data": [ { "id": <int>, "name": <str>, "picture": <str>, "picture_big": <str>, "picture_medium": <str>, "picture_small": <str>, "picture_xl": <str>, "radio": <bool>, "tracklist": <str>, "type": "artist" } ] }
- get_genre_podcasts(genre_id: int | str = 0, /, *, limit: int | None = None, offset: int | None = None) dict[str, Any][source]¶
Genre > Podcasts: Get Deezer catalog information for podcasts primarily associated with a genre.
- Parameters:
- genre_idint or str; positional-only; default:
0 Deezer ID of the genre.
Examples:
0,"2".- limitint; keyword-only; optional
Maximum number of podcasts to return.
Minimum value:
1.- offsetint; keyword-only; optional
Index of the first podcast to return. Use with limit to get the next batch of podcasts.
Minimum value:
0.API default:
0.
- genre_idint or str; positional-only; default:
- Returns:
- podcastsdict[str, Any]
Page of Deezer metadata for the podcasts associated with the genre.
Sample response
{ "data": [], "next": <str>, "prev": <str>, "total": <int> }
- get_genre_radios(genre_id: int | str = 0, /) dict[str, Any][source]¶
Genre > Radios: Get Deezer catalog information for radios primarily associated with a genre.
- Parameters:
- genre_idint or str; positional-only; default:
0 Deezer ID of the genre.
Examples:
0,"2".
- genre_idint or str; positional-only; default:
- Returns:
- radiosdict[str, Any]
Deezer metadata for the radios primarily associated with the genre.
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" } ] }