json

You are currently browsing articles tagged json.

The Open Library JSON API includes an image URL in the book details. The images are lower resolution than the LibraryThing images, but a low-res image is better than none. So in cases where the book’s image is not available from LibraryThing, the BookLinker plugin will use the Open Library image if one is available.

You’re still required to supply a LibraryThing API key if you want the high-res images; but if you don’t supply the API key, you’ll still get a book cover if one is available from Open Library. The “No Image” placeholder will show only if Open Library can’t supply one.

The latency in the Open Library service is significantly higher than the LibraryThing latency; this could be due to how I’m parsing the JSON, or it could be on the service side. So there may some delay in getting the author, title, and book cover to appear in the popup (no more than a couple seconds).

That, and a little tweak to the CSS for displaying the title and author, and I’m calling it ready for testing. You can get the plugin here if you want to try it out in your own WordPress site; otherwise, it should be available in the main WordPress plugin repositories some time next week.

Let me know what you think of this plugin; leave enhancement requests and bug discoveries in the comments on the BookLinker posts or page, or drop me a line. If you have a bug to report, the more information you can provide the better: WordPress version (I’m using 2.7), browser version (so far, I’ve only tested in the current Firefox), operating system (currently working on Windows XP and Ubuntu Jaunty Jackalope), and original URL of the book link you’re using. Bugs are much more fun to squash if I can make them appear on my screen.

Tags: , , , , , ,

Just a couple more updates on the bookLinker WordPress plugin:

  1. Title and author information is now displayed in the popup. The plugin uses the Open Library API, which returns a nice JSON bundle of data. Note that the information is incomplete: not all books are cataloged, and not all cataloged books have title and author information. But it’s an open project, so if you have an interest in helping to make the data more comprehensive, you can visit the site to learn how.
  2. Open Library and GoodReads links are supported now. They can be turned on and off in the plugin settings, just like the other links (IndieBound, Powell’s, Amazon, LibraryThing, and WorldCat).
  3. You can specify your own colors for the popup background and text, and also for the shield layer that comes up between the popup and the main text.

No doubt there are other little adjustments that can make this plugin more useful without adding bloat; feel free to suggest changes or configurations you’d like to see. I plan on giving it a thorough test over the next couple days, both from the admin side and across major browsers, and then submit it to the main WordPress plugin repositories by early next week. Until then, feel free to download it from the BookLinker page and play around with it.

And now it’s time to go do some non-technical reading before bed.

Tags: , , , , , ,

Switch to our mobile site