Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Goodreads API wrapper

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.rdoc

Goodreads – simple client for Goodreads.com API

A simple API client to pull book information and reviews from Goodreads.com. Wrapper uses XML feed and transforms it into the object model.

Getting Started

First, you need to provide your API token

Goodreads.configure('API_TOKEN')

client = Goodreads::Client.new

Usage

Lookup books

Find a book by ISBN:

book = client.book_by_isbn('ISBN')

Find a book by Goodreads ID:

book = client.book('id')

Find a book by title:

book = client.book_by_title('Book title')

Search for books (by title, isbn, genre)

search = client.search_books('Your search query')
search.results.work.each do |book|
  book.id        # => book ID
  book.title     # => book title
end

Pull recent reviews

client.recent_reviews.each do |r|
  r.id            # => review id
  r.book.title    # => review book title
  r.body          # => review message
  r.user.name     # => review user name
end

Get review Details

review = client.review('id')
review.id         # => review ID
review.user       # => review user information
review.book       # => review book information
review.reting     # => review rating

Limitation

  • According to Goodreads API there is a limit of 60 RPM (requests per minute)

  • Provided data cannot be stored for any usage

  • Please check original documentation for additional object fields and properties

Authors

Something went wrong with that request. Please try again.