mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-04 23:17:48 +00:00
Merge pull request #121 from squallcs12/add-me-playlists
add support /me/playlists method
This commit is contained in:
commit
fd35ddbeb7
@ -21,6 +21,7 @@ class SpotifyException(Exception):
|
||||
return 'http status: {0}, code:{1} - {2}'.format(
|
||||
self.http_status, self.code, self.msg)
|
||||
|
||||
|
||||
class Spotify(object):
|
||||
'''
|
||||
Example usage::
|
||||
@ -334,6 +335,14 @@ class Spotify(object):
|
||||
'''
|
||||
return self._get('users/' + user)
|
||||
|
||||
def current_user_playlists(self, limit=50, offset=0):
|
||||
""" Get current user playlists without required getting his profile
|
||||
Parameters:
|
||||
- limit - the number of items to return
|
||||
- offset - the index of the first item to return
|
||||
"""
|
||||
return self._get("me/playlists", limit=limit, offset=offset)
|
||||
|
||||
def user_playlists(self, user, limit=50, offset=0):
|
||||
''' Gets playlists of a user
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user