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



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

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



14
15
16
17
18
19
# File 'lib/pulsedive/analyze.rb', line 14

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