mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-05 07:27:47 +00:00
Added user_playlist_unfollow() method
This commit is contained in:
parent
1e8188206a
commit
2096d32a4e
@ -157,7 +157,6 @@ class Spotify(object):
|
|||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
def _post(self, url, args=None, payload=None, **kwargs):
|
def _post(self, url, args=None, payload=None, **kwargs):
|
||||||
if args:
|
if args:
|
||||||
kwargs.update(args)
|
kwargs.update(args)
|
||||||
@ -378,6 +377,16 @@ class Spotify(object):
|
|||||||
data = {'name':name, 'public':public }
|
data = {'name':name, 'public':public }
|
||||||
return self._post("users/%s/playlists" % (user,), payload = data)
|
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
|
||||||
|
- public - is the created playlist public
|
||||||
|
'''
|
||||||
|
return self._delete("users/%s/playlists/%s/followers" % (user, playlist_id))
|
||||||
|
|
||||||
def user_playlist_add_tracks(self, user, playlist_id, tracks,
|
def user_playlist_add_tracks(self, user, playlist_id, tracks,
|
||||||
position=None):
|
position=None):
|
||||||
''' Adds tracks to a playlist
|
''' Adds tracks to a playlist
|
||||||
|
Loading…
Reference in New Issue
Block a user