Goodreads is a social networking website for readers and claims to be the largest site for book recommendations. As of the end of 2011, Goodreads had 6,800,000 members who added more than 240,000,000 books to their “shelves.” Goodreads members have created about 20 billion reviews (which can be as short as a star rating) according to Read Write Web. A lot of the book data itself comes from a number of sources, including Amazon, Barnes and Noble, Ingram, Library of Congress, Worldcat and others along with data submitted by individual publishers and Goodreads users that become librarians.
This module, along with its bundled submodules, let you integrate that Goodreads data onto your Drupal website.
Goodreads book reviews are the obvious data most Drupal websites are likely to want to integrate. Goodreads recently changed how those reviews are displayed, replacing the XML review text with an iFrame display of reviews for a given book (one presumes to protect their intellectual property). Single reviews can still be accessed via the API, although it is relatively complex. In theory, with special permissions, the older XML versions of the reviews can be accessed, but that is outside the scope of this module at this time.
In addition to seeing the reviews, and other associated book data, the Goodreads API allows you to organize a user’s books onto user defined bookshelves, create and edit reviews, and see the connections of various editions, called works by Goodreads, along with their linkages to authors and book series.
Beyond book data and reviews, Goodreads is first and foremost a community, so it has the usual social networking functions: you can request to be a friend, you can follow someone’s reviews and status updates, you can join groups and post messages on them, much like Drupal’s forums, and you can comment on virtually anything. All this social interaction can be supported by the Goodreads API.
This module, with its submodules, implements most of the Goodreads API. The only part of the API not implemented are those calls that require additional permissions beyond what you can get by signing up as a developer. In addition, there are a few API calls that don’t work, mostly due to now known bugs, which hopefully will get fixed in the near future. Of the 56 documented Goodreads APIs, this base Goodreads module exposes 27, the OAuth module adds 26, 4 currently have unresolved API issues, and there are 4 that require extra permissions and not implemented. The numbers don’t add up because some API’s have OAuth options, resulting in two PHP interface functions and the non-functioning API’s are included in the other categories.
The Goodreads module itself is mostly an API support module, and provides the UI to enter your Goodreads developer key information. It also provides cacheing for the non-OAuth , which could be a requirement to stay within the Goodreads API call limits.
The Goodreads Filter module exposes Goodreads data to your Drupal content via a new input filter which adds tokens like [goodreads_get_isbn_reviews title 1430209895] to insert the title of a book with ISBN 1430209895 into your content. Using a somewhat unusual notation, this module will let you access virtually anything in the Goodreads API. Additionally, in theory it would be possible to use the OAuth module’s functions to change things on Goodreads using the filter, although it is highly discouraged!
The Goodreads Views module stores information about each users’ Goodreads books on all their shelves in a table in your Drupal database and makes that information available via the Views module. The data is rebuilt via cron at a configurable time each day using the Drupal Queue module to avoid overloading your cron job. Depending on the number of Goodreads users, and the number of books on their shelves, you may need several cron runs a day to keep the table up to date.
The Goodreads OAuth module adds support for using the OAuth module’s libraries to enable access to those Goodreads APIs which require OAuth authorization to utilize a user’s information. It adds additional API functions and extends the other submodules to expose additional data to your Drupal content. In addition, if you want to change anything on the Goodreads side, you will need the Goodreads OAuth module.
We'd to thank the developers of the Amazon module for the inspiration of how to expose the Goodreads data to Drupal. Because a lot of Goodreads book data comes from Amazon, and the associated restrictions that Amazon puts on redistribution of that data, Goodreads doesn’t always supply all the information that is displayed on their site via the API. You may find you need the Amazon module to directly access that data from Amazon.
This module was developed for Columbus Metropolitan Library. The use case for Columbus Metropolitan Library uses just a fraction of the Goodreads API exposed by the module. I expect that as more people use it we’ll find lots of areas for improvement.