Class: VirustotalAPI::URL
Overview
A class for ‘/urls’ API
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
-
.analyse(resource, api_key) ⇒ VirustotalAPI::URL
Analyse a URL again.
-
.find(resource, api_key) ⇒ VirustotalAPI::URL
Find a URL.
-
.upload(resource, api_key) ⇒ VirustotalAPI::URL
Upload a URL for detection.
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
.analyse(resource, api_key) ⇒ VirustotalAPI::URL
Analyse a URL again.
23 24 25 26 |
# File 'lib/virustotal_api/url.rb', line 23 def self.analyse(resource, api_key) report = perform("/urls/#{url_identifier(resource)}/analyse", api_key, :post) new(report) end |
.find(resource, api_key) ⇒ VirustotalAPI::URL
Find a URL.
13 14 15 16 |
# File 'lib/virustotal_api/url.rb', line 13 def self.find(resource, api_key) report = perform("/urls/#{url_identifier(resource)}", api_key) new(report) end |
.upload(resource, api_key) ⇒ VirustotalAPI::URL
Upload a URL for detection.
33 34 35 36 |
# File 'lib/virustotal_api/url.rb', line 33 def self.upload(resource, api_key) report = perform('/urls', api_key, :post, url: resource) new(report) end |