Sha256: f66d9d58c746413c25ea2742ad8b110cabe9182675f9130403b9bb89ef28ac76
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
# frozen_string_literal: true module Mihari module Analyzers class HunterHow < Base # @return [String, nil] attr_reader :api_key # @return [Date] attr_reader :start_time # @return [Date] attr_reader :end_time # # @param [String] query # @param [Hash, nil] options # @param [String, nil] api_key # def initialize(query, start_time:, end_time:, options: nil, api_key: nil) super(query, options: options) @api_key = api_key || Mihari.config.hunterhow_api_key @start_time = start_time @end_time = end_time end # # @return [Array<Mihari::Models::Artifact>] # def artifacts client.search_with_pagination( query, start_time: start_time.strftime("%Y-%m-%d"), end_time: end_time.strftime("%Y-%m-%d") ).map do |res| res.data.artifacts end.flatten end def configuration_keys %w[hunterhow_api_key] end private def client @client ||= Clients::HunterHow.new( api_key: api_key, pagination_interval: pagination_interval, timeout: timeout ) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mihari-5.6.2 | lib/mihari/analyzers/hunterhow.rb |