Class: Geocoder::Lookup::PostcodesIo
- Inherits:
-
Base
- Object
- Base
- Geocoder::Lookup::PostcodesIo
show all
- Defined in:
- lib/geocoder/lookups/postcodes_io.rb
Instance Method Summary
collapse
Methods inherited from Base
#cache, #handle, #initialize, #map_link_url, #required_api_key_parts, #search
Instance Method Details
#name ⇒ Object
6
7
8
|
# File 'lib/geocoder/lookups/postcodes_io.rb', line 6
def name
'Postcodes.io'
end
|
#query_url(query) ⇒ Object
10
11
12
|
# File 'lib/geocoder/lookups/postcodes_io.rb', line 10
def query_url(query)
"#{protocol}://api.postcodes.io/postcodes/#{query.sanitized_text.gsub(/\s/, '')}"
end
|
#supported_protocols ⇒ Object
14
15
16
|
# File 'lib/geocoder/lookups/postcodes_io.rb', line 14
def supported_protocols
[:https]
end
|