Skip to content
This repository has been archived by the owner on Aug 30, 2020. It is now read-only.

Commit

Permalink
Propagate api_key changes from upstream geocoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Wechsler committed Aug 19, 2020
1 parent 1023d87 commit 9ef56a0
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions lib/geocoder/lookups/concerns/here_lookup_default_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,24 @@ def handle
end

def required_api_key_parts
["app_id", "app_code"]
["app_key"]
end

def supported_protocols
[:https]
end

private

def query_url_here_options(query)
options = {
app_id: api_key,
app_code: api_code,
api_key: configuration.api_key,
language: (query.language || configuration.language)
}
end

def api_key
if (a = configuration.api_key)
return a.first if a.is_a?(Array)
end
end

def api_code
if (a = configuration.api_key)
return a.last if a.is_a?(Array)
end
end

def domain
if configuration.cit
'cit.api.here.com'
else
'api.here.com'
end
'ls.hereapi.com'
end
end
end

0 comments on commit 9ef56a0

Please sign in to comment.