From 7b85b5ca639958f7df3a6b1ce13cc2c68f93e0d3 Mon Sep 17 00:00:00 2001 From: Mostafa Garana Date: Wed, 5 Jun 2019 09:39:50 +0200 Subject: [PATCH] Adding an endpoint for unfollowing users/artists. --- spotipy/client.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spotipy/client.py b/spotipy/client.py index 897ebdb..b575e64 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -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