diff --git a/examples/simple1.py b/examples/simple1.py index 1748b24..e9c0fb7 100644 --- a/examples/simple1.py +++ b/examples/simple1.py @@ -1,14 +1,15 @@ import spotipy - +from spotipy.oauth2 import SpotifyClientCredentials birdy_uri = 'spotify:artist:2WX2uTcsvV5OnS0inACecP' -spotify = spotipy.Spotify() +client_credentials_manager = SpotifyClientCredentials() +sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager) -results = spotify.artist_albums(birdy_uri, album_type='album') +results = sp.artist_albums(birdy_uri, album_type='album') albums = results['items'] while results['next']: - results = spotify.next(results) + results = sp.next(results) albums.extend(results['items']) for album in albums: