Module: IpToEarth

Defined in:
lib/ip_to_earth.rb,
lib/ip_to_earth/client.rb,
lib/ip_to_earth/api_result.rb,
lib/ip_to_earth/api_exception.rb,
lib/ip_to_earth/configuration.rb,
lib/ip_to_earth/api_controller.rb

Defined Under Namespace

Classes: APIController, APIException, APIResult, Client, Configuration

Class Method Summary collapse

Class Method Details

.lookup(ip) ⇒ Object



11
12
13
# File 'lib/ip_to_earth.rb', line 11

def self.lookup(ip)
  Client.default.lookup(ip)
end

.with_api_key(key) ⇒ Object



15
16
17
# File 'lib/ip_to_earth.rb', line 15

def self.with_api_key(key)
  Client.new(api_key: key)
end