Merge pull request #94 from LiYChristopher/user_unfollow

Added user_playlist_unfollow() method
This commit is contained in:
Paul Lamere 2016-12-31 10:33:24 -05:00 committed by GitHub
commit 7632696106
1 changed files with 9 additions and 1 deletions

View File

@ -161,7 +161,6 @@ class Spotify(object):
else:
raise
def _post(self, url, args=None, payload=None, **kwargs):
if args:
kwargs.update(args)
@ -392,6 +391,15 @@ class Spotify(object):
data = {'name':name, 'public':public }
return self._post("users/%s/playlists" % (user,), payload = data)
def user_playlist_unfollow(self, user, playlist_id):
''' Unfollows (deletes) a playlist for a user
Parameters:
- user - the id of the user
- name - the name of the playlist
'''
return self._delete("users/%s/playlists/%s/followers" % (user, playlist_id))
def user_playlist_add_tracks(self, user, playlist_id, tracks,
position=None):
''' Adds tracks to a playlist