class VirusTotal::API
Attributes
key[R]
@return [String] VirusTotal
API
key
Public Class Methods
new(key: ENV["VIRUSTOTAL_API_KEY"])
click to toggle source
@param [String] key VirusTotal
API
key
@raise [ArgumentError] When given an empty key
# File lib/virustotal/api.rb, line 13 def initialize(key: ENV["VIRUSTOTAL_API_KEY"]) @key = key raise ArgumentError, "No API key has been found or provided! (setup your VIRUSTOTAL_API_KEY environment varialbe)" unless key end
Public Instance Methods
analysis()
click to toggle source
Analyses API
endpoint client
@return [VirusTotal::Client::Analysis]
# File lib/virustotal/api.rb, line 24 def analysis @analysis ||= Client::Analysis.new(key: key) end
domain()
click to toggle source
Domains API
endpoint client
@return [VirusTotal::Client::Domain]
# File lib/virustotal/api.rb, line 33 def domain @domain ||= Client::Domain.new(key: key) end
file()
click to toggle source
Files API
endpoint client
@return [VirusTotal::Client::File]
# File lib/virustotal/api.rb, line 42 def file @file ||= Client::File.new(key: key) end
graph()
click to toggle source
Graphs API
endpoint client
@return [VirusTotal::Client::Graph]
# File lib/virustotal/api.rb, line 69 def graph @graph ||= Client::Graph.new(key: key) end
ip_address()
click to toggle source
IP addresses API
endpoint client
@return [VirusTotal::Client::IPAddress]
# File lib/virustotal/api.rb, line 51 def ip_address @ip_address ||= Client::IPAddress.new(key: key) end
url()
click to toggle source
URLs API
endpoint client
@return [VirusTotal::Client::URL]
# File lib/virustotal/api.rb, line 60 def url @url ||= Client::URL.new(key: key) end