class Geocoder::Lookup::Ipgeolocation

def base_query_url(query)

def base_query_url(query)
  "#{protocol}://api.ipgeolocation.io/ipgeo?"
end

def name

def name
  "Ipgeolocation"
end

def query_url_params(query)

def query_url_params(query)
  {
      ip: query.sanitized_text,
      apiKey: configuration.api_key
  }.merge(super)
end

def reserved_result(ip)

def reserved_result(ip)
  {
      "ip"           => ip,
      "country_name" => "Reserved",
      "country_code2" => "RD"
  }
end

def results(query)

def results(query)
  # don't look up a loopback or private address, just return the stored result
  return [reserved_result(query.text)] if query.internal_ip_address?
  [fetch_data(query)]
end

def supported_protocols

def supported_protocols
  [:https]
end