Sha256: 49344115b983fe0f8e67ba0d817dd30bf824f16050b3df41fcacd82002b29cf7

Contents?: true

Size: 723 Bytes

Versions: 4

Compression:

Stored size: 723 Bytes

Contents

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

4 entries across 4 versions & 1 rubygems

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