lib/geocoder/lookups/pelias.rb in geocoder-1.4.9 vs lib/geocoder/lookups/pelias.rb in geocoder-1.5.0
- old
+ new
@@ -9,19 +9,19 @@
def endpoint
configuration[:endpoint] || 'localhost'
end
- def query_url(query)
- query_type = query.reverse_geocode? ? 'reverse' : 'search'
- "#{protocol}://#{endpoint}/v1/#{query_type}?" + url_query_string(query)
- end
-
def required_api_key_parts
['search-XXXX']
end
- private
+ private # ----------------------------------------------------------------
+
+ def base_query_url(query)
+ query_type = query.reverse_geocode? ? 'reverse' : 'search'
+ "#{protocol}://#{endpoint}/v1/#{query_type}?"
+ end
def query_url_params(query)
params = {
api_key: configuration.api_key,
size: 1