- I like dealing with JSON and
- the XSL transformation is done by Amazon, not me; that wouldn’t be the case if I used XML-RPC.
Anyway, having successfully created a Huffduffer-Amazon bridge using machine tags, I thought I’d do a little more hacking. Instead of restricting the mashup love to Amazon, I figured that Last.fm would be the perfect place to pull in information for anything tagged with the
Last.fm has quite a full-featured API and yes, it can output JSON. To start with, I’m using the
artist.getInfo method for anything tagged with
music:band=.... Here are some examples:
- Law Low (live) by My Morning Jacket
- Let Me Know by Yeah Yeah Yeahs
- Cello Song by Nick Drake covered by José González and The Books
I’m pulling a summary of the artist’s bio, a list of similar artists and a picture of the artist in question. For maximum effect, view in Safari, the browser with the finest implementation of CSS3’s
Nice as Last.fm’s API is, it’s not without its quirks. Like most APIs, the methods are divided into those that require authentication (anything of a sensitive nature) and those that don’t (publicly available information). The method
user.getInfo requires authentication. Yet, every piece of information returned by that method is available on the public profile.
So when I wanted to find a Last.fm user’s profile picture—having figured out through Google’s Social Graph API when someone on Huffduffer has a Last.fm account—it made far more sense for me to use hKit to parse the microformatted public URL than to use the API method.
@adactio ha, I went to Drew’s presentation you mentioned on your blog; it made me add microformats to Last.fm in the first place :D