Merge pull request #136 from SzySteve/follow-playlist

add follow playlist api call
This commit is contained in:
Paul Lamere 2016-12-10 11:43:00 -05:00 committed by GitHub
commit 50a172304b

View File

@ -475,6 +475,17 @@ class Spotify(object):
return self._delete("users/%s/playlists/%s/tracks" % (user, plid), return self._delete("users/%s/playlists/%s/tracks" % (user, plid),
payload = payload) 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): def me(self):
''' Get detailed profile information about the current user. ''' Get detailed profile information about the current user.
An alias for the 'current_user' method. An alias for the 'current_user' method.