mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 09:13:53 +00:00
add additional_types to current_user_playing_track() (#1193)
Co-authored-by: Sebastian Held <sebastian.held@imst.de> Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
This commit is contained in:
parent
5b018cf6af
commit
1a8d9da033
@ -11,6 +11,8 @@ Add your changes below.
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- Adds `additional_types` parameter to retrieve currently playing episode
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|||||||
@ -1256,10 +1256,20 @@ class Spotify:
|
|||||||
"""
|
"""
|
||||||
return self.me()
|
return self.me()
|
||||||
|
|
||||||
def current_user_playing_track(self):
|
def current_user_playing_track(self, market=None, additional_types=("track",)):
|
||||||
""" Get information about the current users currently playing track.
|
""" Get information about the current users currently playing track.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
- market - An ISO 3166-1 alpha-2 country code or the
|
||||||
|
string from_token.
|
||||||
|
- additional_types - list of item types to return.
|
||||||
|
valid types are: track and episode
|
||||||
"""
|
"""
|
||||||
return self._get("me/player/currently-playing")
|
return self._get(
|
||||||
|
"me/player/currently-playing",
|
||||||
|
market=market,
|
||||||
|
additional_types=",".join(additional_types)
|
||||||
|
)
|
||||||
|
|
||||||
def current_user_saved_albums(self, limit=20, offset=0, market=None):
|
def current_user_saved_albums(self, limit=20, offset=0, market=None):
|
||||||
""" Gets a list of the albums saved in the current authorized user's
|
""" Gets a list of the albums saved in the current authorized user's
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user