Class: Graticule::Geocoder::Mapquest::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/graticule/geocoder/mapquest.rb

Instance Method Summary collapse

Constructor Details

#initialize(address, api_key) ⇒ Request

Returns a new instance of Request.


39
40
41
42
# File 'lib/graticule/geocoder/mapquest.rb', line 39

def initialize(address, api_key)
  @address = address
  @api_key = api_key
end

Instance Method Details

#queryObject


44
45
46
# File 'lib/graticule/geocoder/mapquest.rb', line 44

def query
  "key=#{URI.escape(@api_key)}&outFormat=xml&inFormat=kvp&location=#{URI.escape(@address)}"
end