Class: HybridAnalysis::Clients::Overview

Inherits:
Client
  • Object
show all
Defined in:
lib/hybridanalysis/clients/overview.rb

Constant Summary

Constants inherited from Client

Client::BASE_URL, Client::DEFAULT_UA, Client::HOST, Client::VERSION

Instance Attribute Summary

Attributes inherited from Client

#key

Instance Method Summary collapse

Methods inherited from Client

#initialize

Constructor Details

This class inherits a constructor from HybridAnalysis::Clients::Client

Instance Method Details

#get(sha256) ⇒ Hash

return overview for hash

Parameters:

  • sha256 (String)

    SHA256 for lookup

Returns:

  • (Hash)


13
14
15
# File 'lib/hybridanalysis/clients/overview.rb', line 13

def get(sha256)
  _get("/overview/#{sha256}") { |json| json }
end

#refresh(sha256) ⇒ Hash

refresh overview and download fresh data from external services

Parameters:

  • sha256 (String)

    SHA256 for lookup

Returns:

  • (Hash)


24
25
26
# File 'lib/hybridanalysis/clients/overview.rb', line 24

def refresh(sha256)
  _get("/overview/#{sha256}/refresh") { |json| json }
end

#sample(sha256) ⇒ Hash

downloading sample file

Parameters:

  • sha256 (String)

    SHA256 for download

Returns:

  • (Hash)


46
47
48
# File 'lib/hybridanalysis/clients/overview.rb', line 46

def sample(sha256)
  _get("/overview/#{sha256}/sample") { |json| json }
end

#summary(sha256) ⇒ Hash

return overview for hash

Parameters:

  • sha256 (String)

    SHA256 for lookup

Returns:

  • (Hash)


35
36
37
# File 'lib/hybridanalysis/clients/overview.rb', line 35

def summary(sha256)
  _get("/overview/#{sha256}/summary") { |json| json }
end