Machine-tagging Huffduffer some more

After I wrote about the hoops I had to jump through to get Amazon’s API to output JSON (via XSLT), Tom detailed a way of avoiding JSON by using XML-RPC. That’s very kind of him but the truth is that:

  1. I like dealing with JSON and
  2. 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 music namespace.

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:artist=..., music:singer=... or music:band=.... Here are some examples:

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 .

Nice as Last.fm’s API is, it’s not without its quirks. Like most APIs, the methods are divided into those that require (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 when someone on Huffduffer has a Last.fm account—it made far more sense for me to use to parse the microformatted public URL than to use the API method.

Just over two years ago, Drew delivered a superb presentation called In some situations, the answer is definitely “Yes.”

Update: It all ties together, as Julian explains on Twitter:

@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

Sunday, January 25th, 2009 11:48pm

Tagged with

Illustrations

Thanks to the magic of machine tags, you can illustrate this post by tagging a picture on Flickr with:

Tristan Starchild ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel dvd blvd3 london angel 23 dvd blvd3 london angel 25 ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel dvd blvd3 london angel 27 dvd blvd3 london angel 28 dvd blvd3 london angel 21 ANGELIC - science-fiction queen unicorncult.com - London angel dvd blvd3 london angel 22 ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel dvd blvd3 london angel 30 ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel ANGELIC - science-fiction queen unicorncult.com - London angel science-fiction queen unicorncult.com - London angel science-fiction queen unicorncult.com - London angel science-fiction queen unicorncult.com - London angel science-fiction queen unicorncult.com - London angel science-fiction queen unicorncult.com - London angel fashion show walk - strut down the runway - by unicorncult.com  taken at Boulevard3 on Sunset unicorncult.com aurielle and her red boots aurielle wears glasses i am woman study group lovely lint Marti Jean Jewelry by UnicornCult.com Marti Jean Jewelry for UnicornCult.com tristan starchild tristan starchild tristan starchild tristan starchild tristan starchild tristan starchild tristan starchild tristan starchild tristan starchild tristan starchild tristan starchild tristan_starchild_unicorncult_michelle_musikantowmichelle-musikantow-otis30 new 2 (1) new (6) mirror boom new (3) new (8) new (1) new 2 michelle-musikantow-close-up michelle-musikantow-london (7) london12 michelle-musikantow-otis30 copy michelle-musikantow-graffiti michelle-musikantow-chillin hot 2 (1) hot 1 (2) new london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com london vale styled by nicha petprasert, photographed by michelle musikantow / unicorncult.com dvd blvd3 london angel 19 dvd blvd3 london angel 18 dvd blvd3 london angel 26 dvd blvd3 london angel 29 HOSPITAL GOWNS - unicorncult.com

Related

Del.icio.us

Find links I've tagged with huffduffer, last.fm, machinetags, microformats, etc. on Del.icio.us.

Flickr

Find photos I've tagged with huffduffer, last.fm, machinetags, microformats, etc. on Flickr.

Find photos that I took on January 25th, 2009.

More information

About this site

Adactio is the online home of , a web developer living and working in Brighton, England.

Customise

If your browser was up to it, you'd be able to
?

This is the plain vanilla look.

Search


Subscribe

RSS is an XML-based format for syndicating website content. I have some feeds that you can subscribe to:

Elsewhere

Adactio Elsewhere has small pieces of me, loosely joined:

You can also find me scattered across these sites:

Bedroll

I had the pleasure of welcoming these people into my home:

Buy my book

HTML5 for Web Designers