mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 01:03:53 +00:00
Add current_user_saved_albums_delete method
This commit is contained in:
parent
c610090a7c
commit
2aa67580a1
@ -608,7 +608,7 @@ class Spotify(object):
|
||||
'''
|
||||
return self._get('me/player/currently-playing')
|
||||
|
||||
def current_user_saved_albums(self, limit=600, offset=0):
|
||||
def current_user_saved_albums(self, limit=20, offset=0):
|
||||
""" Gets a list of the albums saved in the current authorized user's
|
||||
"Your Music" library
|
||||
|
||||
@ -619,6 +619,18 @@ class Spotify(object):
|
||||
"""
|
||||
return self._get('me/albums', limit=limit, offset=offset)
|
||||
|
||||
def current_user_saved_albums_delete(self, albums=None):
|
||||
""" Remove one or more albums from the current user's
|
||||
"Your Music" library.
|
||||
|
||||
Parameters:
|
||||
- albums - a list of album URIs, URLs or IDs
|
||||
"""
|
||||
alist = []
|
||||
if albums is not None:
|
||||
alist = [self._get_id('album', a) for a in albums]
|
||||
return self._delete('me/albums/?ids=' + ','.join(alist))
|
||||
|
||||
def current_user_saved_tracks(self, limit=20, offset=0):
|
||||
""" Gets a list of the tracks saved in the current authorized user's
|
||||
"Your Music" library
|
||||
|
||||
Loading…
Reference in New Issue
Block a user