View Single Post
Old 10-14-2018, 01:52 AM   #436
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by arogl View Post
Is it possible to add a check for ASIN like there is for ISBN?

I have a number of books that have ASIN but if there is a ISBN version, this plugin uses that version rather than the ASIN?
Attached is a beta that does this. I had a memory of this request being made before, and when I searched I found this post. In that @botmtl posted a version of the plugin that also queried using the ASIN. I have taken some of the ideas from that and reimplemented them.

So, the changes in this beta are:
  • New: Add search by ASIN or other Amazon id if it exists.
  • New: Use auto_complete API for ISBN and ASIN search. Based on code from MR user botmtl.

The plugin already uses the Goodreads ID or ISBN if they exist. Now, it also looks at the various Amazon ids. These id can be "asin", "amazon" or start with "amazon_" if they are country specific. The plugin tests each of these ids using an API call to Goodreads until one works and returns a book. If none of the IDs match a book, or there are no IDs, then the search is done using the title and author.

These ID based searches are done using the Goodreads auto_complete API. On the site, this is use when typing in the search field. There, if you type a valid Goodreads, ISBN or ASIN, the book for that id will be display in the drop-down.

As usual, please test and tell me how it goes. I have done some testing here, but the more that is done, the better.

Last edited by davidfor; 10-24-2018 at 09:08 AM. Reason: Removed beta as it has been released.
davidfor is offline   Reply With Quote