Sha256: 5e39902fb208e8363f7a2188987528b681e53ed7d41ba6313dc67968c6b70cdf
Contents?: true
Size: 1.04 KB
Versions: 19
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true module Mihari module Clients # # PulseDive API client # class PulseDive < Base # @return [String] attr_reader :api_key # # @param [String] base_url # @param [String, nil] api_key # @param [Hash] headers # @param [Integer, nil] timeout # def initialize(base_url = "https://pulsedive.com", api_key:, headers: {}, timeout: nil) raise(ArgumentError, "api_key is required") unless api_key @api_key = api_key super(base_url, headers: headers, timeout: timeout) end # # @param [String] ip_or_domain # # @return [Hash] # def get_indicator(ip_or_domain) get_json "/api/info.php", params: { indicator: ip_or_domain, key: api_key } end # # @param [String] indicator_id # # @return [Hash] # def get_properties(indicator_id) get_json "/api/info.php", params: { iid: indicator_id, get: "properties", key: api_key } end end end end
Version data entries
19 entries across 19 versions & 1 rubygems