artist.getImages

71 views
Skip to first unread message

dineshv

unread,
Jun 15, 2010, 8:54:11 AM6/15/10
to pylast
Hi! A couple of questions:

i. I've not used the last.fm api through pylast for nearly a year -
has it changed much since then?

ii. For a given artist-name, I want to access their image (just one)
using artist.getImages. How do I do this?

Thanks

Marcin Rataj

unread,
Jun 16, 2010, 6:28:03 AM6/16/10
to pylast
On Jun 15, 2:54 pm, dineshv <dineshbvad...@gmail.com> wrote:
> Hi!  A couple of questions:
>
> i.  I've not used the last.fm api through pylast for nearly a year -
> has it changed much since then?

Is it hard to check yourself? :-)
(http://code.google.com/p/pylast/source/browse/trunk/pylast.py)

> ii.  For a given artist-name, I want to access their image (just one)
> using artist.getImages.  How do I do this?

lastfm = pylast.get_lastfm_network(api_key = LASTFM_API_KEY)
lastfm_artist = lastfm.get_artist('Artist Name')
lastfm_image = lastfm_artist.get_images(limit=1)[0]

Again, everything you needed was in:
http://code.google.com/p/pylast/source/browse/trunk/pylast.py
Reply all
Reply to author
Forward
0 new messages