class Geocoder::Lookup::AbstractApi

def base_query_url(query)

def base_query_url(query)
  "#{protocol}://ipgeolocation.abstractapi.com/v1/?"
end

def name

def name
  "Abstract API"
end

def query_url_params(query)

def query_url_params(query)
  params = {api_key: configuration.api_key}
  ip_address = query.sanitized_text
  if ip_address.is_a?(String) && ip_address.length > 0
    params[:ip_address] = ip_address
  end
  params.merge(super)
end

def required_api_key_parts

def required_api_key_parts
  ['api_key']
end

def results(query, reverse = false)

def results(query, reverse = false)
  if doc = fetch_data(query)
    [doc]
  else
    []
  end
end

def supported_protocols

def supported_protocols
  [:https]
end