Class: VirusTotal::Client::Intelligence

Inherits:
Base
  • Object
show all
Defined in:
lib/virustotal/clients/intelligence.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 inherited from Base

#initialize

Constructor Details

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

Instance Method Details

#search(query, order: nil, limit: nil, cursor: nil, descriptors_only: nil) ⇒ Hash

Intelligense search

Parameters:

  • query (String)

    Search query

  • order (String, nil) (defaults to: nil)

    Sort order

  • limit (Integer, nil) (defaults to: nil)

    Maximum number of results

  • cursor (String, nil) (defaults to: nil)

    Continuation cursor

  • descriptors_only (Boolean, nil) (defaults to: nil)

    Whether to return full object information or just object descriptors

Returns:

  • (Hash)


17
18
19
20
21
22
23
24
25
26
27
# File 'lib/virustotal/clients/intelligence.rb', line 17

def search(query, order: nil, limit: nil, cursor: nil, descriptors_only: nil)
  params = {
    query: query,
    order: order,
    limit: limit,
    cursor: cursor,
    descriptors_only: descriptors_only
  }.compact

  _get("/#{name}/search", params) { |json| json }
end