Closed (fixed)
Project:
Google Books
Version:
7.x-2.0
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Anonymous (not verified)
Created:
22 Feb 2013 at 21:22 UTC
Updated:
23 Dec 2016 at 03:52 UTC
Jump to comment: Most recent
Comments
Comment #1
darrell_ulm commentedHi @txtualtrail,
Thanks for reporting this.
I've been looking up on the Google Books API and I'm fairly certain one of these things is happening.
Here:
http://superpowerplanet.com/content/drupal-google-book-filter-module
there are 3 books loading, but not 40. I'm guessing that the lack of an API field in the module is what is causing it and what is needed to have a larger number than a few requests made per minute / hour/ etc.
I was under the impression that as long as the data was public, that Google Books would always return data without a key, however I don't think this is the case.
So requests need to be like:
The call to the API:
is not passing in an API key anywhere.
So what needs to be done (probably)
I'm taking a guess here, but you may have found something where they have stronger requirements to use the API.
Thank you,
Comment #2
Anonymous (not verified) commented@darrellulm
thanks for your quick response (and great module)!
I will dig into your suggested solutions and report back.
Cheers!
Comment #3
darrell_ulm commentedThanks @txtualtrail, also there are things that would be nice to expand and improve as well. I'm looking into some of these areas, and please post back if/when you learn anything.
There appears to be an API limit (with a valid key) of 1000 per day, and the API Key can be created setup at: https://code.google.com/apis/console
Need to create a key for the Books API
then click on Quotas and will see:
Courtesy Limit
If the
per user limitRequest More link is clicked, a new form to request more usage reads:"Description: Please provide a description of your API usage."
I'm guessing that Google would be friendly to non-profit organizations for larger requests.
First we need to get that API Key into the module.
Thanks again,
Comment #4
darrell_ulm commentedHello, I added an API Key to the module, the development head currently, which can be received at:
http://drupal.org/node/1372154/git-instructions/7.x-1.x/nonmaintainer
if you can pull it over with git.
This fix is working with the API Key at:
https://code.google.com/apis/console
and what could be helpful, is in the report tab, you can see how many out of the 1000 daily books you have used up.
Important: every time the cache is cleared, all 40 (or however many) books will try to re-load which will count against the daily limit for 1000, which can be extended if Google OK's the request. Otherwise, I would be careful clearing the cache as the books will need to slowly load back in.
If you (or anybody) can test the development git version at:
http://drupal.org/node/1372154/git-instructions/7.x-1.x/nonmaintainer
you can use the command: git clone --recursive --branch 7.x-1.x http://git.drupal.org/project/google_books.git
if you have git installed, we can get this tested, and I'll make a dev-release.
Thanks again @txtualtrail
Comment #5
Anonymous (not verified) commentedHi @darrellulm,
tested the development git version - I created 1 node containing 80 titles, using title, author, cover (medium), worldcat link, description, categories, average rating, and "Is Available" on a fresh Bitnami 7.20 install with default theme using
[google_books: search string | worldcat]as shortcode. Your changes work like a charm. Thank you!RE: caching - thanks for pointing this out!
Sincerely,
Comment #6
darrell_ulm commentedAlso made a dev release last night at the main page http://drupal.org/project/google_books and it has showed up.
(Just scroll down) 7.x-1.x-dev
If after running this for a while and it seems stable, please anyone post and let us know, and I'll make a 7.x-2.0 release before adding any of the new dev changes. Probably it should have always had the API key in there, but apparently Google allows usage without for a limited test number of requests.
Thanks for the feedback!
Comment #7
darrell_ulm commentedThis has been working and no complaints, so I'm going to close this one out.
Comment #9
darrell_ulm commentedGetting an error here, so something may have changed with Google's API Key interface.
Looking into this.
Comment #10
darrell_ulm commentedIt's working, Google's API interface changed. Tested an API Key and it worked, showing hits, and quota.
Fixed in 7.x-2.0 release.