mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-04 23:17:48 +00:00
Update __init__.py
user_playlist doesn't work with starred playlists, which pass an ID of None. This will allow the user to pull data for starred playlists, which use the URI users/%s/starrred
This commit is contained in:
parent
ceaa030468
commit
f4e11ed170
@ -206,6 +206,8 @@ class Spotify(object):
|
||||
def user_playlist(self, user, playlist_id, fields=None):
|
||||
''' Gets playlist of a user
|
||||
'''
|
||||
if playlist_id == None:
|
||||
return self.get("users/%s/starred" % (user), fields=fields)
|
||||
return self.get("users/%s/playlists/%s" % (user, playlist_id), fields=fields)
|
||||
|
||||
def user_playlist_create(self, user, name, public=True):
|
||||
|
Loading…
Reference in New Issue
Block a user