Sha256: 34cb03d489ee43bd012b0740bd619901dfdcfc088db5c31d8cf266db88ef925c
Contents?: true
Size: 793 Bytes
Versions: 8
Compression:
Stored size: 793 Bytes
Contents
# frozen_string_literal: true module Mihari module Analyzers # # GreyNoise analyzer # class GreyNoise < Base # @return [String, nil] attr_reader :api_key # # @param [String] query # @param [Hash, nil] options # @param [String, nil] api_key # def initialize(query, options: nil, api_key: nil) super(query, options:) @api_key = api_key || Mihari.config.greynoise_api_key end def artifacts client.gnql_search_with_pagination( query, pagination_limit: ).map(&:artifacts).flatten end private def client Clients::GreyNoise.new( api_key:, pagination_interval:, timeout: ) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems