Class: Books
Class Method Summary collapse
Class Method Details
.list_books(author, api_key) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/kbapibooks.rb', line 8 def self.list_books(, api_key) = .gsub(' ', '+') if .match(/\s/) url = "https://www.googleapis.com/books/v1/volumes?q=inauthor:#{}&key=#{api_key}" puts 'VERSION 0.5.0' response = HTTParty.get(url) puts "RESPONSE CODE #{response.code}" response.parsed_response end |