Goodreads API wrapper
Ruby
Pull request Compare This branch is 1 commit ahead, 104 commits behind sosedoff:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
Gemfile
README.rdoc
Rakefile
goodreads.gemspec

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