Created
August 2, 2018 15:28
-
-
Save kittinan/20a82cca210598250450fe720bb39e91 to your computer and use it in GitHub Desktop.
sample code for spotipy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/plamere/spotipy/issues/194#issuecomment-315458391 | |
# http://spotipy.readthedocs.io/en/latest/#client-credentials-flow | |
import spotipy | |
from spotipy.oauth2 import SpotifyClientCredentials | |
client_credentials_manager = SpotifyClientCredentials(client_id='CLIENT_ID', client_secret='CLIENT_SECRET') | |
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager) | |
results = sp.search(q='bodyslam', type='artist', limit=5) | |
artist = sp.artist('ARTIST_ID') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment