Sha256: 3e2ceadffa570175c189011c8a16a4c88377567a88b8458328e86ae7f11de846

Contents?: true

Size: 525 Bytes

Versions: 2

Compression:

Stored size: 525 Bytes

Contents

module Pulsedive
  class API

    attr_reader :api_key
    attr_reader :indicator
    attr_reader :threat
    attr_reader :feed
    attr_reader :analyze

    def initialize(api_key = ENV["PULSEDIVE_API_KEY"])
      raise(ArgumentError, "'api_key' argument is required") unless api_key

      @indicator = Indicator.new(api_key)
      @threat = Threat.new(api_key)
      @feed = Feed.new(api_key)
      @analyze = Analyze.new(api_key)
    end

    def search(params)
      Search.new(api_key).search(params)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pulsedive-0.1.3 lib/pulsedive/api.rb
pulsedive-0.1.2 lib/pulsedive/api.rb