Sha256: 38d1b6ae45597ddfe9e855b66ea6ae8a0f3ac5ebf54308ae20c64627f2e2f003

Contents?: true

Size: 751 Bytes

Versions: 2

Compression:

Stored size: 751 Bytes

Contents

# frozen_string_literal: true

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

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

    def get_links_by_id(iid, page: 0)
      params = {
        "iid": iid,
        "get": "links",
        "page": page
      }
      get("/api/info.php", params) { |json| json }
    end

    def get_properties_by_id(iid)
      params = {
        "iid": iid,
        "get": "properties"
      }
      get("/api/info.php", params) { |json| json }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pulsedive-0.1.5 lib/pulsedive/indicator.rb
pulsedive-0.1.4 lib/pulsedive/indicator.rb