mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 01:03:53 +00:00
add additional_types to current_user_playing_track()
This commit is contained in:
parent
3ec8a2312c
commit
699c615f01
@ -11,6 +11,8 @@ Add your changes below.
|
||||
|
||||
### Added
|
||||
|
||||
- Adds `additional_types` parameter to retrieve currently playing episode
|
||||
|
||||
### Fixed
|
||||
|
||||
### Removed
|
||||
|
||||
@ -1256,10 +1256,20 @@ class Spotify:
|
||||
"""
|
||||
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.
|
||||
|
||||
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):
|
||||
""" Gets a list of the albums saved in the current authorized user's
|
||||
|
||||
Loading…
Reference in New Issue
Block a user