Slide 22
Slide 22 text
22
Example: Searching
class SessionManager(spotify.manager.SpotifySessionManager):
def logged_in(self, session, error):
session.search(“ABBA”, self.results_loaded, track_offset=0,
track_count=5, album_offset=0, album_count=5,
artist_offset=0, artist_count=5)
def results_loaded(self, results, userdata):
print results.total_albums(), “album results in total”
print “First”, len(results.albums()), “albums:”
for album in results.albums():
print album.name()