Class: VirusTotal::Client::URL

Inherits:
Base
  • Object
show all
Includes:
Action::Comments, Action::Get, Action::Relationships, Action::Votes
Defined in:
lib/virustotal/clients/url.rb

Constant Summary

Constants inherited from Base

Base::BASE_URL, Base::CONVERT_TABLE, Base::HOST, Base::VERSION

Instance Attribute Summary

Attributes inherited from Base

#key

Instance Method Summary collapse

Methods included from Action::Votes

#add_vote, #votes

Methods included from Action::Relationships

#method_missing, #respond_to_missing?

Methods included from Action::Get

#get

Methods included from Action::Comments

#add_comment, #comments

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from VirusTotal::Client::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class VirusTotal::Client::Action::Relationships

Instance Method Details

#analyse(url) ⇒ Hash

Analyse an URL.

Parameters:

  • url (String)

    URL identifier

Returns:

  • (Hash)

See Also:



22
23
24
25
# File 'lib/virustotal/clients/url.rb', line 22

def analyse(url)
  id = to_id(url)
  _post("/urls/#{id}/analyse") { |json| json }
end

#network_location(url) ⇒ Hash

Domain or IP address for a URL.

Parameters:

  • url (String)

    URL identifier

Returns:

  • (Hash)

See Also:



36
37
38
39
# File 'lib/virustotal/clients/url.rb', line 36

def network_location(url)
  id = to_id(url)
  _get("/urls/#{id}/network_location") { |json| json }
end