responses
in pyen
, a thin library for music data, returns dictionaries in this fashion:
{u'id': u'AR6SPRZ1187FB4958B', u'name': u'Wilco'}
I'm looping through and printing artists:
response = en.get('artist/search', artist_location='Chicago')
artists = response['artists']
for artist in artists:
sys.stdout.write("song by {}\n".format(artist['name']))
but I'd like to pass a list of ids
here:
response = en.get('song/search', artist_ids = ?) //pass a list here?
for song in response['songs']:
sys.stdout.write("\t{}\n".format(song['title']))
Is this possible? How?