Class: Pulsedive::Analyze

Inherits:
Client
  • Object
show all
Defined in:
lib/pulsedive/analyze.rb

Constant Summary

Constants inherited from Client

Client::HOST, Client::URL

Instance Attribute Summary

Attributes inherited from Client

#api_key

Instance Method Summary collapse

Methods inherited from Client

#initialize

Constructor Details

This class inherits a constructor from Pulsedive::Client

Instance Method Details

#add_to_queue(ioc, enrich: 1, probe: 1) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/pulsedive/analyze.rb', line 7

def add_to_queue(ioc, enrich: 1, probe: 1)
  params = {
    "ioc": Base64.strict_encode64(ioc),
    "enrich": enrich,
    "probe": probe,
  }
  post("/api/analyze.php", params) { |json| json }
end

#get_results_by_id(id) ⇒ Object



16
17
18
19
20
21
# File 'lib/pulsedive/analyze.rb', line 16

def get_results_by_id(id)
  params = {
    qid: id
  }
  get("/api/analyze.php", params) { |json| json }
end