mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-06-19 01:03:53 +00:00
* added URI link to README getting started * revised comment * added alternate module installation instruction * installation troubleshooting comment * scope clarification comment * added playlist_add_items.py to examples folder * reformatted changelog edits * Relocated added contributions to added section in Changelog * removed unnecessary library installation instruction * Clarified alternative installation instruction
14 lines
557 B
Python
14 lines
557 B
Python
# Add a list of items (URI) to a playlist (URI)
|
|
|
|
import spotipy
|
|
from spotipy.oauth2 import SpotifyOAuth
|
|
|
|
sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id="YOUR_APP_CLIENT_ID",
|
|
client_secret="YOUR_APP_CLIENT_SECRET",
|
|
redirect_uri="YOUR_APP_REDIRECT_URI",
|
|
scope="playlist-modify-private"
|
|
))
|
|
|
|
sp.playlist_add_items('playlist_id', ['list_of_items'])
|
|
|