MCPcopy
hub / github.com/spotipy-dev/spotipy / current_user_saved_tracks_add

Method current_user_saved_tracks_add

spotipy/client.py:1440–1450  ·  view source on GitHub ↗

Add one or more tracks to the current user's "Your Music" library. Parameters: - tracks - a list of track URIs, URLs or IDs

(self, tracks=None)

Source from the content-addressed store, hash-verified

1438 return self._get("me/tracks", limit=limit, offset=offset, market=market)
1439
1440 def current_user_saved_tracks_add(self, tracks=None):
1441 """ Add one or more tracks to the current user's
1442 "Your Music" library.
1443
1444 Parameters:
1445 - tracks - a list of track URIs, URLs or IDs
1446 """
1447 tlist = []
1448 if tracks is not None:
1449 tlist = [self._get_uri("track", t) for t in tracks]
1450 return self._put("me/library", uris=",".join(tlist))
1451
1452 def current_user_saved_tracks_delete(self, tracks=None):
1453 """ Remove one or more tracks from the current user's

Calls 2

_get_uriMethod · 0.95
_putMethod · 0.95