Class: Geocoder::Lookup::Ipgeolocation

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

Constant Summary collapse

ERROR_CODES =
{
  400 => Geocoder::RequestDenied, # subscription is paused
  401 => Geocoder::InvalidApiKey, # missing/invalid API key
  403 => Geocoder::InvalidRequest, # invalid IP address
  404 => Geocoder::InvalidRequest, # not found
  423 => Geocoder::InvalidRequest # bogon/reserved IP address
}

Instance Method Summary collapse

Methods inherited from Base

#cache, #handle, #initialize, #map_link_url, #query_url, #required_api_key_parts, #search

Constructor Details

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

Instance Method Details

#nameObject



17
18
19
# File 'lib/geocoder/lookups/ipgeolocation.rb', line 17

def name
  "Ipgeolocation"
end

#supported_protocolsObject



21
22
23
# File 'lib/geocoder/lookups/ipgeolocation.rb', line 21

def supported_protocols
  [:https]
end