mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 01:03:53 +00:00
Update client.py (add playlist endpoint)
There was an upate with Spotify Web APi to bring playlist with using ID.
This commit is contained in:
parent
2ce270554a
commit
9d88a68d50
@ -387,6 +387,20 @@ class Spotify(object):
|
||||
plid = self._get_id('playlist', playlist_id)
|
||||
return self._get("users/%s/playlists/%s" % (user, plid), fields=fields)
|
||||
|
||||
def playlist(self, playlist_id, fields=None, market=None):
|
||||
""" Gets playlist by id
|
||||
|
||||
Parameters:
|
||||
- playlist - the id of the playlist
|
||||
- fields - which fields to return
|
||||
- market - An ISO 3166-1 alpha-2 country code or the string from_token.
|
||||
"""
|
||||
|
||||
plid = self._get_id('playlist', playlist_id)
|
||||
|
||||
return self._get("playlists/%s" % (plid), fields=fields)
|
||||
|
||||
|
||||
def user_playlist_tracks(self, user, playlist_id=None, fields=None,
|
||||
limit=100, offset=0, market=None):
|
||||
""" Get full details of the tracks of a playlist owned by a user.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user