### Get Artists by Genre Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/genre Retrieves a list of all artists associated with a specific genre. ```APIDOC ## GET /genre/{genre_id}/artists ### Description Retrieves a list of all artists associated with a specific genre. ### Method GET ### Endpoint `/genre/{genre_id}/artists` ### Parameters #### Path Parameters - **genre_id** (int) - Required - The ID of the genre. #### Query Parameters - **limit** (int) - Optional - The number of artists to return. - **offset** (int) - Optional - The number of artists to skip. ### Response #### Success Response (200) - **artists** (list[Artist]) - A list of Artist objects. #### Response Example ```json { "artists": [ { "id": 12345, "name": "Artist Name", "picture": "url_to_artist_picture" } ] } ``` ``` -------------------------------- ### Get Radios by Genre Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/genre Retrieves a list of all radios associated with a specific genre. ```APIDOC ## GET /genre/{genre_id}/radios ### Description Retrieves a list of all radios associated with a specific genre. ### Method GET ### Endpoint `/genre/{genre_id}/radios` ### Parameters #### Path Parameters - **genre_id** (int) - Required - The ID of the genre. #### Query Parameters - **limit** (int) - Optional - The number of radios to return. - **offset** (int) - Optional - The number of radios to skip. ### Response #### Success Response (200) - **radios** (list[Radio]) - A list of Radio objects. #### Response Example ```json { "radios": [ { "id": 11223, "title": "Radio Title", "url": "radio_stream_url" } ] } ``` ``` -------------------------------- ### Get Podcasts by Genre Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/genre Retrieves a paginated list of all podcasts associated with a specific genre. ```APIDOC ## GET /genre/{genre_id}/podcasts ### Description Retrieves a paginated list of all podcasts associated with a specific genre. ### Method GET ### Endpoint `/genre/{genre_id}/podcasts` ### Parameters #### Path Parameters - **genre_id** (int) - Required - The ID of the genre. #### Query Parameters - **limit** (int) - Optional - The number of podcasts to return per page. - **offset** (int) - Optional - The number of podcasts to skip. ### Response #### Success Response (200) - **podcasts** (PaginatedList[Podcast]) - A paginated list of Podcast objects. #### Response Example ```json { "podcasts": [ { "id": 67890, "title": "Podcast Title", "description": "Podcast description" } ], "total": 100, "next": "/path/to/next/page" } ``` ``` -------------------------------- ### Get Radio Tracks Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/radio Retrieves the first 40 tracks associated with a specific radio station. Note that this endpoint does not support pagination. ```APIDOC ## GET /radio/{id}/tracks ### Description Retrieves the first 40 tracks in the radio. ### Method GET ### Endpoint `/radio/{id}/tracks` ### Parameters #### Path Parameters - **id** (int) - Required - The ID of the radio station. ### Response #### Success Response (200) - **tracks** (list[Track]) - A list of `Track` instances from the radio station. #### Response Example ```json [ { "id": 12345, "title": "Example Track", "artist": { "id": 67890, "name": "Example Artist" } // ... other track details } // ... more tracks ] ``` ``` -------------------------------- ### Get Album Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves a specific album by its unique ID. ```APIDOC ## Get Album ### Description Fetches a specific album from the Deezer API using its ID. ### Method ```python client.get_album(album_id) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python album = client.get_album(133700) print(album.title) ``` ### Response #### Success Response (200) An `Album` object representing the requested album. #### Response Example ```python # Represents album details like title, artist, etc. ``` ``` -------------------------------- ### Get Artist Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves a specific artist by their unique ID. ```APIDOC ## Get Artist ### Description Fetches a specific artist from the Deezer API using their ID. ### Method ```python client.get_artist(artist_id) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python artist = client.get_artist(27) print(artist.name) ``` ### Response #### Success Response (200) An `Artist` object representing the requested artist. #### Response Example ```python # Represents artist details like name, image, etc. ``` ``` -------------------------------- ### Get Genre Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves a specific genre by its unique ID. ```APIDOC ## Get Genre ### Description Fetches a specific music genre from Deezer using its ID. ### Method ```python client.get_genre(genre_id) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python genre = client.get_genre(7) # Get details for the Pop genre print(genre.name) ``` ### Response #### Success Response (200) A `Genre` object representing the requested genre. #### Response Example ```python # Represents genre details like name, picture, etc. ``` ``` -------------------------------- ### Get Podcast Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves a specific podcast by its unique ID. ```APIDOC ## Get Podcast ### Description Fetches a specific podcast from Deezer using its ID. ### Method ```python client.get_podcast(podcast_id) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python podcast = client.get_podcast(987654321) print(podcast.title) ``` ### Response #### Success Response (200) A `Podcast` object representing the requested podcast. #### Response Example ```python # Represents podcast details like title, description, cover image, etc. ``` ``` -------------------------------- ### Get Playlist Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves a specific playlist by its unique ID. ```APIDOC ## Get Playlist ### Description Fetches a specific playlist from Deezer using its ID. ### Method ```python client.get_playlist(playlist_id) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python playlist = client.get_playlist(1234567890) print(playlist.title) ``` ### Response #### Success Response (200) A `Playlist` object representing the requested playlist. #### Response Example ```python # Represents playlist details like title, creator, track count, etc. ``` ``` -------------------------------- ### Get Top Podcasts by Genre Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Fetch a list of top podcasts for a given genre ID. It defaults to all genres if `genre_id` is not specified. The method returns a list of `Podcast` instances. ```python import deezer client = deezer.Client() # Get top podcasts for all genres # top_podcasts = client.get_podcasts_chart() # Get top podcasts for a specific genre (e.g., News, genre_id=6) # news_podcasts = client.get_podcasts_chart(genre_id=6) ``` -------------------------------- ### Get Podcasts Chart Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves the top podcasts for a specified genre ID. ```APIDOC ## Get Podcasts Chart ### Description Fetches a list of the top podcasts within a specific genre. Defaults to all genres if no genre ID is provided. ### Method ```python client.get_podcasts_chart(genre_id=0) ``` ### Parameters #### Path Parameters None #### Query Parameters - **genre_id** (int) - Optional - The ID of the genre to get top podcasts for. Defaults to 0 (all genres). #### Request Body None ### Request Example ```python top_podcasts = client.get_podcasts_chart(genre_id=167) # Top podcasts for News genre for podcast in top_podcasts: print(podcast.title) ``` ### Response #### Success Response (200) A list of `Podcast` objects representing the top podcasts for the specified genre. #### Response Example ```json [ { "id": 1122, "title": "Podcast Title", "description": "...", "..." }, ... ] ``` ``` -------------------------------- ### Get Episode Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves a specific podcast episode by its unique ID. ```APIDOC ## Get Episode ### Description Fetches a specific podcast episode from Deezer using its ID. ### Method ```python client.get_episode(episode_id) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python episode = client.get_episode(12345678) print(episode.title) ``` ### Response #### Success Response (200) An `Episode` object representing the requested podcast episode. #### Response Example ```python # Represents episode details like title, audio URL, etc. ``` ``` -------------------------------- ### Get Albums Chart Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves the top albums for a specified genre ID. ```APIDOC ## Get Albums Chart ### Description Fetches a list of the top albums within a specific genre. Defaults to all genres if no genre ID is provided. ### Method ```python client.get_albums_chart(genre_id=0) ``` ### Parameters #### Path Parameters None #### Query Parameters - **genre_id** (int) - Optional - The ID of the genre to get top albums for. Defaults to 0 (all genres). #### Request Body None ### Request Example ```python top_albums = client.get_albums_chart(genre_id=7) # Top albums for Pop genre for album in top_albums: print(album.title) ``` ### Response #### Success Response (200) A list of `Album` objects representing the top albums for the specified genre. #### Response Example ```json [ { "id": 12345, "title": "Album Title", "artist": { ... }, "..." }, ... ] ``` ``` -------------------------------- ### Get Podcast by ID Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Fetch a podcast using its unique ID. This method returns a `Podcast` object with details about the podcast. The input parameter must be an integer representing the podcast ID. ```python import deezer client = deezer.Client() podcast_id = 171819 # podcast = client.get_podcast(podcast_id) # print(podcast.title) ``` -------------------------------- ### Get Tracks Chart Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves the top tracks for a specified genre ID. ```APIDOC ## Get Tracks Chart ### Description Fetches a list of the top tracks within a specific genre. Defaults to all genres if no genre ID is provided. ### Method ```python client.get_tracks_chart(genre_id=0) ``` ### Parameters #### Path Parameters None #### Query Parameters - **genre_id** (int) - Optional - The ID of the genre to get top tracks for. Defaults to 0 (all genres). #### Request Body None ### Request Example ```python top_tracks = client.get_tracks_chart(genre_id=335) # Top tracks for Dance genre for track in top_tracks: print(track.title) ``` ### Response #### Success Response (200) A list of `Track` objects representing the top tracks for the specified genre. #### Response Example ```python [ , ] ``` ``` -------------------------------- ### Get Artists Chart Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves the top artists for a specified genre ID. ```APIDOC ## Get Artists Chart ### Description Fetches a list of the top artists within a specific genre. Defaults to all genres if no genre ID is provided. ### Method ```python client.get_artists_chart(genre_id=0) ``` ### Parameters #### Path Parameters None #### Query Parameters - **genre_id** (int) - Optional - The ID of the genre to get top artists for. Defaults to 0 (all genres). #### Request Body None ### Request Example ```python top_artists = client.get_artists_chart(genre_id=152) # Top artists for Rock genre for artist in top_artists: print(artist.name) ``` ### Response #### Success Response (200) A list of `Artist` objects representing the top artists for the specified genre. #### Response Example ```json [ { "id": 5678, "name": "Artist Name", "picture_medium": "...", "..." }, ... ] ``` ``` -------------------------------- ### Get Top Radios Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves a list of the top-rated radio stations on Deezer. ```APIDOC ## Get Top Radios ### Description Fetches a list of the most popular or highest-rated radio stations on Deezer. ### Method ```python client.get_radios_top() ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python top_radios = client.get_radios_top() for radio in top_radios: print(radio.title) ``` ### Response #### Success Response (200) A list of `Radio` objects representing the top radio stations. #### Response Example ```json [ { "id": 9012, "title": "Top Radio Name 1", "description": "...", "..." }, ... ] ``` ``` -------------------------------- ### Get Top Artists by Genre Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Fetch a list of top artists based on a given genre ID. If `genre_id` is not provided, it defaults to all genres. The method returns a list of `Artist` instances. ```python import deezer client = deezer.Client() # Get top artists for all genres # top_artists = client.get_artists_chart() # Get top artists for a specific genre (e.g., Hip Hop, genre_id=4) # hiphop_artists = client.get_artists_chart(genre_id=4) ``` -------------------------------- ### Get Top Tracks by Genre Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Fetch a list of top tracks for a given genre ID. Defaults to all genres if `genre_id` is not specified. The method returns a list of `Track` instances. ```python import deezer client = deezer.Client() # Get top tracks for all genres # top_tracks = client.get_tracks_chart() # Get top tracks for a specific genre (e.g., Rock, genre_id=2) # rock_tracks = client.get_tracks_chart(genre_id=2) ``` -------------------------------- ### Get Chart Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves overall charts (tracks, albums, artists, playlists) for a specified genre ID. ```APIDOC ## Get Chart ### Description Retrieves the top charts for tracks, albums, artists, and playlists within a specific genre. Defaults to all genres if no genre ID is provided. ### Method ```python client.get_chart(genre_id=0) ``` ### Parameters #### Path Parameters None #### Query Parameters - **genre_id** (int) - Optional - The ID of the genre to get charts for. Defaults to 0 (all genres). #### Request Body None ### Request Example ```python chart_data = client.get_chart(genre_id=152) # Get charts for Rock genre print(chart_data.tracks) ``` ### Response #### Success Response (200) A `Chart` object containing lists of top tracks, albums, artists, and playlists. #### Response Example ```python # Contains properties like tracks, albums, artists, playlists ``` ``` -------------------------------- ### Get Deezer Chart Podcasts Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/chart Retrieves a paginated list of podcasts from the Deezer chart. This method requires an authenticated client and may accept additional keyword arguments for filtering or pagination. The returned data is a list of Podcast objects. ```python from deezer import Deezer client = Deezer() chart = client.chart() podcasts = chart.get_podcasts() for podcast in podcasts: print(podcast.title) ``` -------------------------------- ### Make Generic API Request Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Utilize the `request` method for making generic HTTP requests to the Deezer API. This method is versatile, supporting different HTTP methods (GET, POST, DELETE, etc.) and allowing specification of the resource path, type, and ID. It can also paginate list responses. ```python import deezer client = deezer.Client() # Example: Make a GET request to retrieve an artist with ID 1234 # response = client.request('GET', '/artist/1234') # Example: Make a POST request # response = client.request('POST', '/some/endpoint', data={'key': 'value'}) # Example: Fetching a paginated list of albums # albums_paginated = client.request('/album', paginate_list=True) ``` -------------------------------- ### Get Top Albums by Genre Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieve a list of top albums for a specified genre ID. Defaults to all genres if `genre_id` is omitted. The result is a list of `Album` objects. ```python import deezer client = deezer.Client() # Get top albums for all genres # top_albums = client.get_albums_chart() # Get top albums for a specific genre (e.g., Electronic, genre_id=3) # electronic_albums = client.get_albums_chart(genre_id=3) ``` -------------------------------- ### Get Podcast Episodes - Python Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/podcast Retrieves a paginated list of episodes for a given podcast using the deezer-python library. This method allows for additional keyword arguments to filter or customize the results. It returns a PaginatedList of Episode objects. ```python podcast.get_episodes(**kwargs) ``` -------------------------------- ### Get Charts by Genre Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieve overall charts (tracks, albums, artists, playlists) for a specified genre ID. If no genre ID is provided, it defaults to all genres (ID 0). This method returns a `Chart` instance. ```python import deezer client = deezer.Client() # Get charts for all genres # charts = client.get_chart() # Get charts for a specific genre (e.g., Pop, genre_id=1) # pop_charts = client.get_chart(genre_id=1) ``` -------------------------------- ### Get Deezer Editorial Selections (Python) Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/editorial Retrieves a list of albums curated weekly by the Deezer Team using the deezer-python library. This method requires an initialized Deezer client and returns a list of Album objects. ```python from deezer import Deezer client = Deezer() editorial = client.editorial() selections = editorial.get_selection() for album in selections: print(f"Album: {album.title} by {album.artist.name}") ``` -------------------------------- ### Get Deezer Chart Playlists Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/chart Retrieves a paginated list of playlists from the Deezer chart. This method requires an authenticated client and may accept additional keyword arguments for filtering or pagination. The returned data is a list of Playlist objects. ```python from deezer import Deezer client = Deezer() chart = client.chart() playlists = chart.get_playlists() for playlist in playlists: print(playlist.title) ``` -------------------------------- ### Get Artist by ID Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Fetch artist details from the Deezer API by providing the artist's unique ID. The method returns an `Artist` object populated with information about the artist. The input must be an integer representing the artist ID. ```python import deezer client = deezer.Client() artist_id = 1234 # artist = client.get_artist(artist_id) # print(artist.name) ``` -------------------------------- ### Client Initialization Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Initialize the Deezer API client. You can optionally provide an access token and custom headers. ```APIDOC ## Client Initialization ### Description Instantiate the Deezer client to interact with the API. Supports optional access tokens and custom headers for specifying preferences like language. ### Method ```python import deezer # Basic initialization client = deezer.Client() # With access token client = deezer.Client(access_token='YOUR_ACCESS_TOKEN') # With custom headers (e.g., to force language) client = deezer.Client(headers={'Accept-Language': 'fr'}) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "access_token": "YOUR_ACCESS_TOKEN", "headers": { "Accept-Language": "fr" } } ``` ### Response #### Success Response (200) An instance of the `deezer.Client` class. #### Response Example ```python ``` ``` -------------------------------- ### Initialize Deezer Client Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Instantiate the Deezer client to interact with the API. You can provide an access token for authenticated requests or custom headers to control aspects like response language. The client is the primary entry point for all API operations. ```python import deezer # Initialize with default settings client = deezer.Client() # Initialize with an access token # client = deezer.Client(access_token='YOUR_ACCESS_TOKEN') # Initialize with custom headers, e.g., to set response language to French client = deezer.Client(headers={'Accept-Language': 'fr'}) ``` -------------------------------- ### Episode Methods Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/episode Provides methods to interact with episode bookmarks. ```APIDOC ## Episode Methods ### Description Methods for managing bookmarks on Deezer episodes. ### `add_bookmark(offset)` #### Description Sets a bookmark on the episode at a specified offset. #### Parameters - **offset** (int) - Required - The offset where the bookmark is set, must be between 0 and 100. #### Returns - **bool** - `True` if the operation was successful, `False` otherwise. ### `remove_bookmark()` #### Description Removes the bookmark on the episode. #### Returns - **bool** - `True` if the operation was successful, `False` otherwise. ``` -------------------------------- ### User Methods Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/user Provides methods to interact with user-specific data, such as managing favorite albums, tracks, artists, followers, and playlists. ```APIDOC ## User Management Methods ### Description Methods for managing a user's favorite content and relationships on Deezer. ### Methods #### `get_albums()` Get user’s favorite albums. - **Returns**: a `PaginatedList` of `Album` instances. - **Return type**: `PaginatedList[Album]` #### `add_album(album)` Add an album to user’s favorite albums. - **Parameters**: - **album** (Album | int) - An `Album` instance or its ID. - **Returns**: A boolean indicating if the operation was successful. #### `remove_album(album)` Remove an album from user’s favorite albums. - **Parameters**: - **album** (Album | int) - An `Album` instance or its ID. - **Returns**: A boolean indicating if the operation was successful. #### `get_tracks()` Get user’s favorite tracks. - **Returns**: a `PaginatedList` of `Track` instances. - **Return type**: `PaginatedList[Track]` #### `add_track(track)` Add a track to user’s favorite tracks. - **Parameters**: - **track** (Track | int) - A `Track` instance or its ID. - **Returns**: A boolean indicating if the operation was successful. #### `remove_track(track)` Remove a track from user’s favorite tracks. - **Parameters**: - **track** (Track | int) - A `Track` instance or its ID. - **Returns**: A boolean indicating if the operation was successful. #### `get_artists()` Get user’s favorite artists. - **Returns**: a `PaginatedList` of `Artist` instances. - **Return type**: `PaginatedList[Artist]` #### `add_artist(artist)` Add an artist to user’s favorite artists. - **Parameters**: - **artist** (Artist | int) - An `Artist` instance or its ID. - **Returns**: A boolean indicating if the operation was successful. #### `remove_artist(artist)` Remove an artist from user’s favorite artists. - **Parameters**: - **artist** (Artist | int) - An `Artist` instance or its ID. - **Returns**: A boolean indicating if the operation was successful. #### `get_followers()` Get user’s followers. - **Returns**: a `PaginatedList` of `User` instances. - **Return type**: `PaginatedList[User]` #### `get_followings()` Get user’s followings. - **Returns**: a `PaginatedList` of `User` instances. - **Return type**: `PaginatedList[User]` #### `follow(user)` Follow a user. - **Parameters**: - **user** (User | int) - A `User` instance or its ID. - **Returns**: A boolean indicating if the operation was successful. #### `unfollow(user)` Unfollow a user. - **Parameters**: - **user** (User | int) - A `User` instance or its ID. - **Returns**: A boolean indicating if the operation was successful. #### `get_playlists()` Get user’s public playlists. - **Returns**: a `PaginatedList` of `Playlist` instances. - **Return type**: `PaginatedList[Playlist]` #### `add_playlist(playlist)` Add a playlist to user’s public playlists. - **Parameters**: - **playlist** (Playlist | int) - A `Playlist` instance or its ID. - **Returns**: A boolean indicating if the operation was successful. #### `remove_playlist(playlist)` Remove a playlist from user’s public playlists. - **Parameters**: - **playlist** (Playlist | int) - A `Playlist` instance or its ID. - **Returns**: A boolean indicating if the operation was successful. #### `create_playlist(title)` Create a playlist. - **Parameters**: - **title** (str) - The title of the playlist. - **Returns**: The ID of the playlist that was created. - **Return type**: int ``` -------------------------------- ### Track Object Methods Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/track Details the methods available for interacting with a Deezer track object. ```APIDOC ## Track Object Methods Methods for retrieving related information for a Deezer track object. ### `get_artist()` Retrieves the artist of the track. - **Method**: N/A (Instance method) - **Returns**: The `Artist` object associated with the track. - **Return Type**: `Artist` ### `get_album()` Retrieves the album the track belongs to. - **Method**: N/A (Instance method) - **Returns**: The `Album` instance associated with the track. - **Return Type**: `Album` ``` -------------------------------- ### List Editorials Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Lists all available editorial content. ```APIDOC ## List Editorials ### Description Retrieves a paginated list of all available editorial content on Deezer. ### Method ```python client.list_editorials() ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python editorials = client.list_editorials() for editorial in editorials: print(editorial.title) ``` ### Response #### Success Response (200) A `PaginatedList` object containing `Editorial` objects. #### Response Example ```python # Iterable containing Editorial objects ``` ``` -------------------------------- ### List All Radios Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Fetch a list of all available radio stations on Deezer. The method returns a list of `Radio` instances, each representing a radio station. ```python import deezer client = deezer.Client() # radios = client.list_radios() # for radio in radios: # print(radio.title) ``` -------------------------------- ### Get Editorial Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves a specific editorial content by its unique ID. ```APIDOC ## Get Editorial ### Description Fetches specific editorial content from Deezer using its ID. ### Method ```python client.get_editorial(editorial_id) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python editorial = client.get_editorial(1) print(editorial.title) ``` ### Response #### Success Response (200) An `Editorial` object representing the requested editorial content. #### Response Example ```python # Contains details like title, content, etc. ``` ``` -------------------------------- ### Get Radio Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves a specific radio station by its unique ID. ```APIDOC ## Get Radio ### Description Fetches a specific radio station from Deezer using its ID. ### Method ```python client.get_radio(radio_id) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python radio = client.get_radio(1234) print(radio.title) ``` ### Response #### Success Response (200) A `Radio` object representing the requested radio station. #### Response Example ```python # Represents radio details like title, description, etc. ``` ``` -------------------------------- ### List All Genres Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieve a list of all available musical genres on Deezer. The method returns a list of `Genre` instances, each representing a distinct music genre. ```python import deezer client = deezer.Client() # genres = client.list_genres() # for genre in genres: # print(genre.name) ``` -------------------------------- ### User Playlist Management Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client APIs for managing playlists within a user's Deezer library. ```APIDOC ## POST /user/me/playlists/{playlist_id} ### Description Remove a playlist from the user's library. ### Method POST ### Endpoint /user/me/playlists/{playlist_id} ### Parameters #### Path Parameters - **playlist_id** (int) - Required - The ID of the playlist to remove. ### Request Example ```json { "playlist_id": 123456 } ``` ### Response #### Success Response (200) - **success** (bool) - Indicates whether the operation succeeded. #### Response Example ```json { "success": true } ``` ## POST /user/me/playlists ### Description Add a playlist to the user's library. ### Method POST ### Endpoint /user/me/playlists ### Parameters #### Request Body - **playlist_id** (int) - Required - The ID of the playlist to add. ### Request Example ```json { "playlist_id": 123456 } ``` ### Response #### Success Response (200) - **success** (bool) - Indicates whether the operation succeeded. #### Response Example ```json { "success": true } ``` ## POST /user/me/create_playlist ### Description Create a playlist on the user's account. ### Method POST ### Endpoint /user/me/create_playlist ### Parameters #### Request Body - **playlist_name** (str) - Required - The name of the playlist. ### Request Example ```json { "playlist_name": "My Awesome Playlist" } ``` ### Response #### Success Response (200) - **playlist_id** (int) - The ID of the playlist that was created. #### Response Example ```json { "playlist_id": 789012 } ``` ## DELETE /user/me/playlists/{playlist_id} ### Description Delete a playlist from the user's account. ### Method DELETE ### Endpoint /user/me/playlists/{playlist_id} ### Parameters #### Path Parameters - **playlist_id** (int) - Required - The ID of the playlist to remove. ### Request Example ```json { "playlist_id": 123456 } ``` ### Response #### Success Response (200) - **success** (bool) - Indicates whether the operation succeeded. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### User Management API Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/user This API group provides methods for managing user followings and playlists, as well as retrieving a user's playlists. ```APIDOC ## User.get_followings() ### Description Retrieves a list of users that the current user is following. ### Method GET ### Endpoint /user/me/followings ### Parameters None ### Request Example ```json { "example": "No request body needed." } ``` ### Response #### Success Response (200) - **data** (list) - A list of user objects representing followed users. #### Response Example ```json { "data": [ { "id": 12345, "name": "Artist Name", "picture_small": "http://.../picture_small.jpg" } ] } ``` ## User.follow() ### Description Allows the current user to follow another user. ### Method POST ### Endpoint /user/me/followings ### Parameters #### Query Parameters - **user_id** (int) - Required - The ID of the user to follow. ### Request Example ```json { "example": "No request body needed. Use query parameters." } ``` ### Response #### Success Response (200) - **result** (bool) - Indicates if the follow operation was successful. #### Response Example ```json { "result": true } ``` ## User.unfollow() ### Description Allows the current user to unfollow another user. ### Method DELETE ### Endpoint /user/me/followings/{user_id} ### Parameters #### Path Parameters - **user_id** (int) - Required - The ID of the user to unfollow. ### Request Example ```json { "example": "No request body needed. Use path parameters." } ``` ### Response #### Success Response (200) - **result** (bool) - Indicates if the unfollow operation was successful. #### Response Example ```json { "result": true } ``` ## User.get_playlists() ### Description Retrieves a list of playlists created or owned by the user. ### Method GET ### Endpoint /user/me/playlists ### Parameters None ### Request Example ```json { "example": "No request body needed." } ``` ### Response #### Success Response (200) - **data** (list) - A list of playlist objects. #### Response Example ```json { "data": [ { "id": 1234567, "title": "My Awesome Playlist", "nb_tracks": 50 } ] } ``` ## User.add_playlist() ### Description Adds a playlist to the user's library or to a list of playlists they manage. ### Method POST ### Endpoint /user/me/playlists ### Parameters #### Request Body - **playlist_id** (int) - Required - The ID of the playlist to add. ### Request Example ```json { "playlist_id": 7654321 } ``` ### Response #### Success Response (200) - **result** (bool) - Indicates if the playlist was added successfully. #### Response Example ```json { "result": true } ``` ## User.remove_playlist() ### Description Removes a playlist from the user's library or from a list of playlists they manage. ### Method DELETE ### Endpoint /user/me/playlists/{playlist_id} ### Parameters #### Path Parameters - **playlist_id** (int) - Required - The ID of the playlist to remove. ### Request Example ```json { "example": "No request body needed. Use path parameters." } ``` ### Response #### Success Response (200) - **result** (bool) - Indicates if the playlist was removed successfully. #### Response Example ```json { "result": true } ``` ## User.create_playlist() ### Description Creates a new playlist for the current user. ### Method POST ### Endpoint /user/me/playlists ### Parameters #### Request Body - **title** (string) - Required - The title of the new playlist. - **public** (bool) - Optional - Whether the playlist should be public (defaults to false). - **description** (string) - Optional - A description for the playlist. ### Request Example ```json { "title": "My New Cool Playlist", "public": false, "description": "A playlist for all my favorite tracks." } ``` ### Response #### Success Response (200) - **id** (int) - The ID of the newly created playlist. - **title** (string) - The title of the new playlist. - **creation_date** (string) - The date the playlist was created. #### Response Example ```json { "id": 9876543, "title": "My New Cool Playlist", "creation_date": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### List Genres Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Lists all available music genres on Deezer. ```APIDOC ## List Genres ### Description Retrieves a list of all music genres available on the Deezer platform. ### Method ```python client.list_genres() ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python genres = client.list_genres() for genre in genres: print(f"ID: {genre.id}, Name: {genre.name}") ``` ### Response #### Success Response (200) A list of `Genre` objects. #### Response Example ```json [ { "id": 335, "name": "Dance", "picture": "...", "type": "genre" }, { "id": 7, "name": "Pop", "picture": "...", "type": "genre" }, ... ] ``` ``` -------------------------------- ### Request Method Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client A general-purpose method to make requests to the Deezer API. It handles method, path, and optional resource type and ID. ```APIDOC ## Request Method ### Description This is a low-level method to make direct API calls. It's useful for accessing endpoints not directly exposed by wrapper methods. ### Method ```python client.request(method, path, parent=None, resource_type=None, resource_id=None, paginate_list=False, **kwargs) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python # Example: Making a GET request to /artist/1234 response = client.request('GET', 'artist/1234') # Example: Making a POST request (hypothetical) response = client.request('POST', '/some/endpoint', data={'key': 'value'}) ``` ### Response #### Success Response (200) Parsed JSON response from the API, often represented as Deezer resource objects or a list of them. #### Response Example ```json { "id": 1234, "name": "Artist Name", "..." } ``` ``` -------------------------------- ### Get Playlists Chart Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Retrieves the top playlists for a specified genre ID. ```APIDOC ## Get Playlists Chart ### Description Fetches a list of the top playlists within a specific genre. Defaults to all genres if no genre ID is provided. ### Method ```python client.get_playlists_chart(genre_id=0) ``` ### Parameters #### Path Parameters None #### Query Parameters - **genre_id** (int) - Optional - The ID of the genre to get top playlists for. Defaults to 0 (all genres). #### Request Body None ### Request Example ```python top_playlists = client.get_playlists_chart(genre_id=13) # Top playlists for Hip-Hop genre for playlist in top_playlists: print(playlist.title) ``` ### Response #### Success Response (200) A list of `Playlist` objects representing the top playlists for the specified genre. #### Response Example ```json [ { "id": 9876, "title": "Playlist Title", "creator": { ... }, "..." }, ... ] ``` ``` -------------------------------- ### Playlist Methods - Fans and Status Source: https://deezer-python.readthedocs.io/en/stable/api_reference/resources/playlist Includes methods for retrieving playlist fans and updating the playlist's seen status. `get_fans` returns a paginated list of User objects, while `mark_seen` updates the playlist's status and returns a boolean. ```python def get_fans(self, **kwargs) -> PaginatedList[User]: """Get fans from a playlist.""" ... def mark_seen(self) -> bool: """Mark the playlist as seen.""" ... ``` -------------------------------- ### List Radios Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client Lists all available radio stations on Deezer. ```APIDOC ## List Radios ### Description Retrieves a list of all radio stations available on the Deezer platform. ### Method ```python client.list_radios() ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python radios = client.list_radios() for radio in radios: print(radio.title) ``` ### Response #### Success Response (200) A list of `Radio` objects. #### Response Example ```json [ { "id": 1234, "title": "Radio Name 1", "description": "...", "..." }, { "id": 5678, "title": "Radio Name 2", "description": "...", "..." }, ... ] ``` ``` -------------------------------- ### Search APIs Source: https://deezer-python.readthedocs.io/en/stable/api_reference/client APIs for searching various music content on Deezer. ```APIDOC ## GET /search ### Description Search tracks. Advanced search is available by either formatting the query yourself or by using the dedicated keywords arguments. ### Method GET ### Endpoint /search ### Parameters #### Query Parameters - **query** (str) - Optional - The query to search for, this is directly passed as q query. - **strict** (bool | None) - Optional - Whether to disable fuzzy search and enable strict mode. - **ordering** (str | None) - Optional - See Deezer API docs for possible values. - **artist** (str | None) - Optional - Parameter for the advanced search feature. - **album** (str | None) - Optional - Parameter for the advanced search feature. - **track** (str | None) - Optional - Parameter for the advanced search feature. - **label** (str | None) - Optional - Parameter for the advanced search feature. - **dur_min** (int | None) - Optional - Parameter for the advanced search feature. - **dur_max** (int | None) - Optional - Parameter for the advanced search feature. - **bpm_min** (int | None) - Optional - Parameter for the advanced search feature. - **bpm_max** (int | None) - Optional - Parameter for the advanced search feature. ### Response #### Success Response (200) - **tracks** (list[Track]) - A list of `Track` instances. #### Response Example ```json { "tracks": [ { "id": 12345, "title": "Example Track" } ] } ``` ## GET /search/albums ### Description Search albums matching the given query. ### Method GET ### Endpoint /search/albums ### Parameters #### Query Parameters - **query** (str) - Optional - The query to search for, this is directly passed as q query. - **strict** (bool | None) - Optional - Whether to disable fuzzy search and enable strict mode. - **ordering** (str | None) - Optional - See Deezer API docs for possible values. ### Response #### Success Response (200) - **albums** (list[Album]) - A list of `Album` instances. #### Response Example ```json { "albums": [ { "id": 67890, "title": "Example Album" } ] } ``` ## GET /search/artists ### Description Search artists matching the given query. ### Method GET ### Endpoint /search/artists ### Parameters #### Query Parameters - **query** (str) - Optional - The query to search for, this is directly passed as q query. - **strict** (bool | None) - Optional - Whether to disable fuzzy search and enable strict mode. - **ordering** (str | None) - Optional - See Deezer API docs for possible values. ### Response #### Success Response (200) - **artists** (list[Artist]) - A list of `Artist` instances. #### Response Example ```json { "artists": [ { "id": 11223, "name": "Example Artist" } ] } ``` ## GET /search/playlists ### Description Search playlists matching the given query. ### Method GET ### Endpoint /search/playlists ### Parameters #### Query Parameters - **query** (str) - Optional - The query to search for, this is directly passed as q query. - **strict** (bool | None) - Optional - Whether to disable fuzzy search and enable strict mode. - **ordering** (str | None) - Optional - See Deezer API docs for possible values. ### Response #### Success Response (200) - **playlists** (list[Playlist]) - A list of `Playlist` instances. #### Response Example ```json { "playlists": [ { "id": 44556, "title": "Example Playlist" } ] } ``` ```