How to get book cover from ISBN using Google Book API?

流过昼夜 提交于 2019-12-03 01:58:31

问题


Is there a simple way to get book cover in JSON format from ISBN using Google Book API?


回答1:


You can use the isbn: query, like this:

https://www.googleapis.com/books/v1/volumes?q=isbn:0771595158

This will return a proper JSON response containing either the book information or an error description if the ISBN is not found.




回答2:


If you are looking for an answer for a Ruby (Rails, Sinatra or Console) answer on how to get a conver image or for that matter any detail available through the Google Books API, I think GoogleBooks gem is a good place to start.

For example, for the same scenario:

Install the gem

gem install googlebooks

Use the gem

require 'googlebooks'
GoogleBooks.search('isbn:9781443411080').first.image_link

first because it returns a collection of books.



来源:https://stackoverflow.com/questions/14422528/how-to-get-book-cover-from-isbn-using-google-book-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!