class PassiveTotal::API
Attributes
api_key[R]
username[R]
Public Class Methods
new(username: ENV["PASSIVETOTAL_USERNAME"], api_key: ENV["PASSIVETOTAL_API_KEY"])
click to toggle source
# File lib/passivetotal/api.rb, line 8 def initialize(username: ENV["PASSIVETOTAL_USERNAME"], api_key: ENV["PASSIVETOTAL_API_KEY"]) @username = username raise ArgumentError, "No usernamme has been found or provided!" unless @username @api_key = api_key raise ArgumentError, "No api key has been found or provided!" unless @api_key end
Public Instance Methods
account()
click to toggle source
# File lib/passivetotal/api.rb, line 16 def account @account ||= Client::Account.new(username: username, api_key: api_key) end
action()
click to toggle source
# File lib/passivetotal/api.rb, line 20 def action @action ||= Client::Action.new(username: username, api_key: api_key) end
artifact()
click to toggle source
# File lib/passivetotal/api.rb, line 24 def artifact @artifact ||= Client::Artifact.new(username: username, api_key: api_key) end
base()
click to toggle source
# File lib/passivetotal/api.rb, line 28 def base @base ||= Client::Base.new(username: username, api_key: api_key) end
dns()
click to toggle source
# File lib/passivetotal/api.rb, line 32 def dns @dns ||= Client::DNS.new(username: username, api_key: api_key) end
enrichment()
click to toggle source
# File lib/passivetotal/api.rb, line 36 def enrichment @enrichment ||= Client::Enrichment.new(username: username, api_key: api_key) end
host()
click to toggle source
# File lib/passivetotal/api.rb, line 40 def host @host ||= Client::Host.new(username: username, api_key: api_key) end
monitor()
click to toggle source
# File lib/passivetotal/api.rb, line 44 def monitor @monitor ||= Client::Monitor.new(username: username, api_key: api_key) end
project()
click to toggle source
# File lib/passivetotal/api.rb, line 48 def project @project ||= Client::Project.new(username: username, api_key: api_key) end
ssl()
click to toggle source
# File lib/passivetotal/api.rb, line 52 def ssl @ssl ||= Client::SSL.new(username: username, api_key: api_key) end
tag()
click to toggle source
# File lib/passivetotal/api.rb, line 56 def tag @tag ||= Client::Tag.new(username: username, api_key: api_key) end
tracker()
click to toggle source
# File lib/passivetotal/api.rb, line 60 def tracker @tracker ||= Client::Tracker.new(username: username, api_key: api_key) end
whois()
click to toggle source
# File lib/passivetotal/api.rb, line 64 def whois @whois ||= Client::WHOIS.new(username: username, api_key: api_key) end