From a7dfda54d31906f1128b3a56aad0a4607ae88cf3 Mon Sep 17 00:00:00 2001 From: Ilya Gubins Date: Sat, 29 Aug 2020 12:38:39 +0200 Subject: [PATCH] Adds option to retrieve currently playing podcast episode. Fixes #562 (#563) * Adds option to retrieve currently playing podcast episode. Fixes #562 * Fixing lint error: a bit over the 99 character limit * Fixing lint error: ugh --- spotipy/client.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spotipy/client.py b/spotipy/client.py index 7c726c1..7a6036d 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -1620,21 +1620,24 @@ class Spotify(object): """ return self._get("me/player/devices") - def current_playback(self, market=None): + def current_playback(self, market=None, additional_types=None): """ Get information about user's current playback. Parameters: - market - an ISO 3166-1 alpha-2 country code. + - additional_types - `episode` to get podcast track information """ - return self._get("me/player", market=market) + return self._get("me/player", market=market, additional_types=additional_types) - def currently_playing(self, market=None): + def currently_playing(self, market=None, additional_types=None): """ Get user's currently playing track. Parameters: - market - an ISO 3166-1 alpha-2 country code. + - additional_types - `episode` to get podcast track information """ - return self._get("me/player/currently-playing", market=market) + return self._get("me/player/currently-playing", market=market, + additional_types=additional_types) def transfer_playback(self, device_id, force_play=True): """ Transfer playback to another device.