module Goodreads::Books

Public Instance Methods

find_book_by_title_author_isbn(query) click to toggle source
# File lib/goodreads/api/books.rb, line 39
def find_book_by_title_author_isbn(query)
  query = query.gsub(' ', '+')
  info[:path] = '/search/index.xml'
  info[:data] = { key: info[:key], q: query }
  uri = build_uri(info)
  call(uri)
end
get_review_for_book_by_author_and_title(author, title) click to toggle source
# File lib/goodreads/api/books.rb, line 11
def get_review_for_book_by_author_and_title(author, title)
  info[:path] = '/book/title.xml'
  info[:data] = { key: info[:key], title: title, author: author }
  uri = build_uri(info)
  call(uri)
end
get_review_for_book_by_title(title) click to toggle source
# File lib/goodreads/api/books.rb, line 4
def get_review_for_book_by_title(title)
  info[:path] = '/book/title.xml'
  info[:data] = { key: info[:key], title: title }
  uri = build_uri(info)
  call(uri)
end
get_review_for_book_given_goodreads_book_id(id) click to toggle source
# File lib/goodreads/api/books.rb, line 25
def get_review_for_book_given_goodreads_book_id(id)
  info[:path] = '/book/show/' + id.to_s + '.xml'
  info[:data] = { key: info[:key] }
  uri = build_uri(info)
  call(uri)
end
get_reviews_for_given_isbns(isbns) click to toggle source
# File lib/goodreads/api/books.rb, line 18
def get_reviews_for_given_isbns(isbns)
  info[:path] = '/book/review_counts.json'
  info[:data] = { key: info[:key], isbns: isbns }
  uri = build_uri(info)
  call(uri)
end
get_user_review_for_given_book(user_id, book_id) click to toggle source
# File lib/goodreads/api/books.rb, line 32
def get_user_review_for_given_book(user_id, book_id)
  info[:path] = '/review/show_by_user_and_book.xml'
  info[:data] = { key: info[:key], book_id: book_id, user_id: user_id }
  uri = build_uri(info)
  call(uri)
end