Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG GooglePlaces::Client#spot of 0.24.0 #63

Closed
smntkm opened this issue Aug 28, 2014 · 5 comments
Closed

BUG GooglePlaces::Client#spot of 0.24.0 #63

smntkm opened this issue Aug 28, 2014 · 5 comments

Comments

@smntkm
Copy link

smntkm commented Aug 28, 2014

Thank you for making this gem.

With a GooglePlaces::Clinet#spot of 0.24.0, error occurs.

ex.
clinet = GooglePlaces::Client.new(API_KEY, true)
client.spot('Cp...69w')
=> GooglePlaces::InvalidRequestError: GooglePlaces::InvalidRequestError
from google_places-0.24.0/lib/google_places/request.rb:325:in `parsed_response'

Please a fix.

@marceldegraaf
Copy link
Collaborator

Hi @smntkm, I'm not sure why this fails for you; I cannot reproduce the issue:

client = GooglePlaces::Client.new(API_KEY)
id = client.spots(-33.8670522, 151.1957362).first.place_id
client.spot(id).name
=> "Pyrmont"

@smntkm
Copy link
Author

smntkm commented Aug 29, 2014

Hi @marceldegraaf, Thank you for reply.
I also and try the above code, data was able to get.
But, the same error came out in reference.
forgot to say the attribute to get, sorry.

client = GooglePlaces::Client.new(API_KEY)
reference = client.spots(-33.8670522, 151.1957362).first.reference
client.spot(reference)
=> GooglePlaces::InvalidRequestError: GooglePlaces::InvalidRequestError
from google_places-0.24.0/lib/google_places/request.rb:325:in `parsed_response'

@marceldegraaf
Copy link
Collaborator

Hi @smntkm, I see what happens. But it is expected, because you can only use the place_id as parameter to client.spot(), not the reference.

@smntkm
Copy link
Author

smntkm commented Aug 29, 2014

Hi @marceldegraaf, I was wrong.
I'm sorry.
From now on, I will use the palce_id.
Thank you.

@smntkm smntkm closed this as completed Aug 29, 2014
@marceldegraaf
Copy link
Collaborator

No problem! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants