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

Have you published a response to this? :

Responses

Chris Aldrich

Replied to Machine-tagging Huffduffer some more by Jeremy Keith (adactio.com) 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: I like dealing with JSON and the XSL transformation is done by Amazon, not me; that wouldn’t b…

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.

So the secret to having one’s image appear in their Huffduffer account is to add a rel=”me” to one’s home page? What triggers the reparsing? I’m not seeing it pop up… — Annotated on December 06, 2019 at 10:37PM

Syndicated copies to:

Previously on this day

13 years ago I wrote Map games

Look to the skies.

13 years ago I wrote Whither Twitter?

Why bother? What’s the point?

15 years ago I wrote An email to Wired News

Hello Wired News people,

16 years ago I wrote The blog entry that wasn't

Things have been very quite here in my online journal lately.

18 years ago I wrote Picture to HTML

This is very nifty.

18 years ago I wrote Have you ever wondered...

…what would happen if you were using the toilet on an airplane and flushed while still seated?