Sha256: 8776813bdc9d7f2e7e0adbf20d29b7f32242442f9dcdfbb41a4a6a7715909b08
Contents?: true
Size: 967 Bytes
Versions: 10
Compression:
Stored size: 967 Bytes
Contents
module Goodreads module Books # Search for books # # query - Text to match against book title, author, and ISBN fields. # options - Optional search parameters # # options[:page] - Which page to returns (default: 1) # options[:field] - Search field. One of: title, author, or genre (default is all) # def search_books(query, params={}) params[:q] = query.to_s.strip data = request('/search/index', params) Hashie::Mash.new(data['search']) end # Get book details by Goodreads book ID # def book(id) Hashie::Mash.new(request('/book/show', :id => id)['book']) end # Get book details by book ISBN # def book_by_isbn(isbn) Hashie::Mash.new(request('/book/isbn', :isbn => isbn)['book']) end # Get book details by book title # def book_by_title(title) Hashie::Mash.new(request('/book/title', :title => title)['book']) end end end
Version data entries
10 entries across 10 versions & 2 rubygems