Skip to content
Snippets Groups Projects
Commit d68d24d4 authored by robdiciuccio's avatar robdiciuccio
Browse files

Update MapQuest lookup for new mandatory API key requirement

parent bb2d338a
No related branches found
No related tags found
No related merge requests found
...@@ -10,12 +10,11 @@ module Geocoder::Lookup ...@@ -10,12 +10,11 @@ module Geocoder::Lookup
end end
def required_api_key_parts def required_api_key_parts
[] ["key"]
end end
def query_url(query) def query_url(query)
key = configuration.api_key domain = configuration[:licensed] ? "www" : "open"
domain = key ? "www" : "open"
url = "#{protocol}://#{domain}.mapquestapi.com/geocoding/v1/#{search_type(query)}?" url = "#{protocol}://#{domain}.mapquestapi.com/geocoding/v1/#{search_type(query)}?"
url + url_query_string(query) url + url_query_string(query)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment