Class: DNSDB::API

Inherits:
Object
  • Object
show all
Defined in:
lib/dnsdb/api.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_key = ENV["DNSDB_API_KEY"]) ⇒ API

Returns a new instance of API.



5
6
7
# File 'lib/dnsdb/api.rb', line 5

def initialize(api_key = ENV["DNSDB_API_KEY"])
  @api_key = api_key
end

Instance Method Details

#lookupObject



9
10
11
# File 'lib/dnsdb/api.rb', line 9

def lookup
  @lookup ||= Clients::Lookup.new(@api_key)
end

#summarizeObject



13
14
15
# File 'lib/dnsdb/api.rb', line 13

def summarize
  @summarize ||= Clients::Summarize.new(@api_key)
end