Machine-tagging Huffduffer

Over the weekend I was looking at the latest additions to Huffduffer. I noticed that Xavier Roy was using to tag a reading by Richard Dawkins. What an excellent idea!

I set aside a little time to do a little hacking with Amazon’s API. Now you can tag stuff on Huffduffer with machine tags like book:author=steven johnson, book:title=the invention of air or music:artist=my morning jacket. Other namespaces are film and movie. Anything matching that pattern will trigger a search on Amazon and display a list of results.

Amazon’s API was one of the first I ever messed about with, first on The Session and later on Adactio Elsewhere. There are things I really like about it and things I really dislike.

I dislike the fact that there’s no option to receive JSON instead of XML. However, one of the things I like is the option to pass the URL of an file to transform the XML (I wish more APIs offered that service). So even though JSON isn’t officially offered, it’s perfectly feasible to generate JSON from the combination of XML + XSL. That’s what I did for the Huffduffer hacking—I find it a lot easier to deal with JSON than XML in PHP5. If you fancy doing something similar, help yourself to my XSL file. It’s very basic but it could make a decent starting point.

But the thing I dislike the most about the Amazon API is the documentation. It’s not that there’s a lack of documentation. Far from it. It’s just not organised very well. I find it very hard to get the information I need, even when I know that the information is there somewhere. Flickr still leads the pack when it comes to API documentation. Amazon would do well to take a leaf out of Flickr’s documentation book (hope you’re listening, Jeff).

Have you published a response to this? :

Responses

1 Bookmark

# Bookmarked by Chris Aldrich on Saturday, December 7th, 2019 at 7:26am

Previously on this day

12 years ago I wrote Broken

The default behaviour of Internet Explorer’s new version switching is very, very wrong.

15 years ago I wrote Yub nub!

I’m sure I’ve mentioned before that Jamie, head-honcho at Message, has a brother who is a famous act-ohr.

17 years ago I wrote A gallery of travellery

As I prepare for my next ‘plane trip, I thought I’d share these pictures of an airplane journey.

17 years ago I wrote Northwards

Jessica and I are headed to Seattle.

18 years ago I wrote Sheer tastlessness

This banner ad is shocking for two reasons.