Skip Menu |

This queue is for tickets about the Geo-Coder-Googlev3 CPAN distribution.

Report information
The Basics
Id: 128326
Status: open
Priority: 0/
Queue: Geo-Coder-Googlev3

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
torstenru [...] gmx.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.17
Fixed in: (no value)



Subject: Test failures: REQUEST_DENIED
The test suite started to fail since some days. All requests are now answered with a status:REQUEST_DENIED by Google, and an explanation that an API key is missing or invalid. Possible actions: - add API key support, but currently I cannot test this - deprecate/abandon/... this module
On 2019-01-22 13:34:26, SREZIC wrote: Show quoted text
> The test suite started to fail since some days. All requests are now > answered with a status:REQUEST_DENIED by Google, and an explanation > that an API key is missing or invalid. > > Possible actions: > - add API key support, but currently I cannot test this > - deprecate/abandon/... this module
The test suite should be able to run some tests without using the network.. say by simulating the server side. And then the tests that use the *real* network should be marked with Test::RequiresInternet: this allows the user to avoid using the network for whatever reason, by setting NO_NETWORK_TESTING, and also checks that the desired site is reachable before attempting to use it.
I always/often get an "OVER_QUERY_LIMIT" error, so I need a way to provide an API key. I think there have been some major changes in June 2018 and Google now forces to provide an api key: https://developers.google.com/maps/billing/important-updates Is there any chance to simply set the api key within the code?
On 2019-03-07 05:03:33, torstenru@gmx.de wrote: Show quoted text
> I always/often get an "OVER_QUERY_LIMIT" error, so I need a way to > provide an API key. > > I think there have been some major changes in June 2018 and Google now > forces to provide an api key: > https://developers.google.com/maps/billing/important-updates > > Is there any chance to simply set the api key within the code?
Maybe it's as easy as adding "&api=$apikey" to the query string. However, I don't add an API key and also don't plan to acquire one, so I cannot really test it. Do you have an API key available and are you able to fix the code and provide a PR? Or even better, are you interested in taking over maintainership of the module? Regards, Slaven
I'm not familiar with maintaining code here, but I could fix the code by changing: my $resp = $ua->get($url); to my $resp = $ua->get($url.'&key=MYKEY'); and additionally by changing the Google Maps API url from http:// to https://.
On 2019-03-08 08:31:08, torstenru@gmx.de wrote: Show quoted text
> I'm not familiar with maintaining code here, but I could fix the code > by changing: > > my $resp = $ua->get($url); > to > my $resp = $ua->get($url.'&key=MYKEY'); > > and additionally by changing the Google Maps API url from http:// to > https://.
It would be another $url_params setting in the method geocode_url. As for https, there's an option use_https, but if GoogleMaps is https-only nowadays (I don't know, probably it is), then this could be made unconditionally true.