Artists¶
-
class
spotify.
Artist
(session, uri=None, sp_artist=None, add_ref=True)[source]¶ A Spotify artist.
You can get artists from tracks and albums, or you can create an
Artist
yourself from a Spotify URI:>>> session = spotify.Session() # ... >>> artist = session.get_artist( ... 'spotify:artist:22xRIphSN7IkPVbErICu7s') >>> artist.load().name u'Rob Dougan'
-
class
spotify.
ArtistBrowser
(session, artist=None, type=None, callback=None, sp_artistbrowse=None, add_ref=True)[source]¶ An artist browser for a Spotify artist.
You can get an artist browser from any
Artist
instance by callingArtist.browse()
:>>> session = spotify.Session() # ... >>> artist = session.get_artist( ... 'spotify:artist:421vyBBkhgRAOz4cYPvrZJ') >>> browser = artist.browse() >>> browser.load() >>> len(browser.albums) 7