From 1f4189b1be192f9ed0080804805154a812164d6e Mon Sep 17 00:00:00 2001 From: Bang Dao Date: Tue, 18 Oct 2016 10:14:54 +0700 Subject: [PATCH 1/2] add me_playlists method --- spotipy/client.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spotipy/client.py b/spotipy/client.py index c3b4b69..357b68c 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -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:: @@ -330,6 +331,14 @@ class Spotify(object): ''' return self._get('users/' + user) + def me_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 From b48990f02a35a1a48d3f5f4aafcf1a1713550361 Mon Sep 17 00:00:00 2001 From: Paul Lamere Date: Sat, 31 Dec 2016 10:10:22 -0500 Subject: [PATCH 2/2] renamed me_playlists t renamed me_playlists to current_user_playlists to match style of other 'me' endpoints --- spotipy/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotipy/client.py b/spotipy/client.py index 357b68c..e36e8c8 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -331,7 +331,7 @@ class Spotify(object): ''' return self._get('users/' + user) - def me_playlists(self, limit=50, offset=0): + 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