qpowell / google_places

A Ruby wrapper around the Google Places API
MIT License
382 stars 188 forks source link

expose json_result_object #121

Closed josh-m-sharpe closed 5 years ago

josh-m-sharpe commented 5 years ago

Seems to do the trick for: https://github.com/qpowell/google_places/issues/119

2.5.3 :007 > res = client.spots_by_query("statue of liberty")
 => #...
2.5.3 :008 > res[0].name
 => "Statue of Liberty National Monument"

2.5.3 :009 > new_spot = GooglePlaces::Spot.new(res[0].json_result_object, ENV['GOOGLE_PLACES_API_KEY'])
 => #...
2.5.3 :010 > new_spot.name
 => "Statue of Liberty National Monument"
edwinwills commented 5 years ago

👍