Class: Geocoder::Lookup::UkOrdnanceSurveyNames

Inherits:
Base
  • Object
show all
Defined in:
lib/geocoder/lookups/uk_ordnance_survey_names.rb

Instance Method Summary collapse

Methods inherited from Base

#cache, #handle, #initialize, #map_link_url, #search

Constructor Details

This class inherits a constructor from Geocoder::Lookup::Base

Instance Method Details

#base_query_url(query) ⇒ Object


15
16
17
# File 'lib/geocoder/lookups/uk_ordnance_survey_names.rb', line 15

def base_query_url(query)
  "#{protocol}://api.ordnancesurvey.co.uk/opennames/v1/find?"
end

#nameObject


7
8
9
# File 'lib/geocoder/lookups/uk_ordnance_survey_names.rb', line 7

def name
  'Ordance Survey Names'
end

#query_url(query) ⇒ Object


23
24
25
# File 'lib/geocoder/lookups/uk_ordnance_survey_names.rb', line 23

def query_url(query)
  base_query_url(query) + url_query_string(query)
end

#required_api_key_partsObject


19
20
21
# File 'lib/geocoder/lookups/uk_ordnance_survey_names.rb', line 19

def required_api_key_parts
  ["key"]
end

#supported_protocolsObject


11
12
13
# File 'lib/geocoder/lookups/uk_ordnance_survey_names.rb', line 11

def supported_protocols
  [:https]
end