Sha256: 27b20720a87b03f8a1fa6c9132236bef528420c4526fba52f1a3bacbf0586b11

Contents?: true

Size: 690 Bytes

Versions: 4

Compression:

Stored size: 690 Bytes

Contents

module Pulsedive
  class Threat < Client
    def get_by_id(tid)
      params = {
        "tid": tid
      }
      get("/api/info.php", params) { |json| json }
    end

    def get_by_name(tname)
      params = {
        "tname": tname
      }
      get("/api/info.php", params) { |json| json }
    end

    def get_summary_by_id(tld)
      params = {
        "tid": tld,
        "get": "links",
        "summary": "1",
        "splitrisk": "1"
      }
      get("/api/info.php", params) { |json| json }
    end

    def get_linked_indicators_by_id(tld)
      params = {
        "tid": tld,
        "get": "links"
      }
      get("/api/info.php", params) { |json| json }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pulsedive-0.1.3 lib/pulsedive/threat.rb
pulsedive-0.1.2 lib/pulsedive/threat.rb
pulsedive-0.1.1 lib/pulsedive/threat.rb
pulsedive-0.1.0 lib/pulsedive/threat.rb