class GooglePlaceTextSearch

Public Instance Methods

get_response(api_key,radius,location,query) click to toggle source
# File lib/google_place_text_search.rb, line 5
def get_response(api_key,radius,location,query)
  url = "https://maps.googleapis.com/maps/api/place/textsearch/json"
  #location="#{lat},#{lng}"

  query_data = {:key=>api_key,:query=>query, :location=>location,:radius=>radius}
  response = HTTParty.get("#{url}", :query=>query_data)

  json = JSON.parse(response.body)
  return json
end