Class: VirustotalAPI::IP

Inherits:
Base
  • Object
show all
Defined in:
lib/virustotal_api/ip.rb

Overview

A class for ‘/ip_addresses’ API

Instance Attribute Summary

Attributes inherited from Base

#id, #report, #report_url

Class Method Summary collapse

Methods inherited from Base

#api_uri, api_uri, #exists?, #initialize, perform, perform_absolute, url_identifier

Constructor Details

This class inherits a constructor from VirustotalAPI::Base

Class Method Details

.find(ip, api_key) ⇒ VirustotalAPI::IPReport

Find an IP.

Parameters:

  • ip (String)

    address The IP to find.

  • api_key (String)

    The key for virustotal

Returns:

  • (VirustotalAPI::IPReport)

    Report



13
14
15
16
# File 'lib/virustotal_api/ip.rb', line 13

def self.find(ip, api_key)
  report = perform("/ip_addresses/#{ip}", api_key)
  new(report)
end