Adding an endpoint for unfollowing users/artists.

This commit is contained in:
Mostafa Garana 2019-06-05 09:39:50 +02:00 committed by Stephane Bruckert
parent f8a6e4edb6
commit 7b85b5ca63

View File

@ -754,6 +754,20 @@ class Spotify(object):
'''
return self._put('me/following?type=user&ids=' + ','.join(ids))
def user_unfollow_artists(self, ids=[]):
''' Unfollow one or more artists
Parameters:
- ids - a list of artist IDs
'''
return self._delete('me/following?type=artist&ids=' + ','.join(ids))
def user_unfollow_users(self, ids=[]):
''' Unfollow one or more users
Parameters:
- ids - a list of user IDs
'''
return self._delete('me/following?type=user&ids=' + ','.join(ids))
def featured_playlists(self, locale=None, country=None, timestamp=None,
limit=20, offset=0):
""" Get a list of Spotify featured playlists