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?
pyen is a very thin wrapper, you should always check the EchoNest API docs directly. According to the API documentation, the song/search endpoint does not accept multiple artist_ids.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With