From 1e937dd29f6f55d41188c12b733a143bf51e3282 Mon Sep 17 00:00:00 2001 From: jairogcontreras Date: Wed, 2 Nov 2016 13:51:32 -0700 Subject: [PATCH 1/3] fixed incorrect comment about purpose of script --- examples/show_my_saved_tracks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/show_my_saved_tracks.py b/examples/show_my_saved_tracks.py index 4e74562..ac3fc42 100644 --- a/examples/show_my_saved_tracks.py +++ b/examples/show_my_saved_tracks.py @@ -1,5 +1,4 @@ - -# Adds tracks to a playlist +# shows a user's saved tracks (need to be authenticated via oauth) import sys import spotipy From 7f0f7efe49b4561ab377710588b1299e929b4986 Mon Sep 17 00:00:00 2001 From: Jason Hamilton Date: Fri, 11 Nov 2016 11:28:40 -0800 Subject: [PATCH 2/3] fixes test for related artists. Fixes issue #128. --- tests/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests.py b/tests/tests.py index c78233d..8f57e24 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -83,7 +83,7 @@ class TestSpotipy(unittest.TestCase): self.assertTrue('artists' in results) self.assertTrue(len(results['artists']) == 20) for artist in results['artists']: - if artist['name'] == 'Rivers Cuomo': + if artist['name'] == 'Jimmy Eat World': found = True self.assertTrue(found) From a97959c54e35972fa56e722811e25ecceff91348 Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 8 Dec 2016 14:27:43 -0500 Subject: [PATCH 3/3] add follow playlist api call --- spotipy/client.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spotipy/client.py b/spotipy/client.py index 8b15d9e..0d32172 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -475,6 +475,17 @@ class Spotify(object): return self._delete("users/%s/playlists/%s/tracks" % (user, plid), payload = payload) + def user_playlist_follow_playlist(self, playlist_owner_id, playlist_id): + ''' + Add the current authenticated user as a follower of a playlist. + + Parameters: + - playlist_owner_id - the user id of the playlist owner + - playlist_id - the id of the playlist + + ''' + return self._put("users/{}/playlists/{}/followers".format(playlist_owner_id, playlist_id)) + def me(self): ''' Get detailed profile information about the current user. An alias for the 'current_user' method.