lib/mihari/schemas/analyzer.rb in mihari-5.3.2 vs lib/mihari/schemas/analyzer.rb in mihari-5.4.0

- old
+ new

@@ -2,12 +2,13 @@ module Mihari module Schemas AnalyzerOptions = Dry::Schema.Params do optional(:interval).value(:integer) - optional(:retry_times).value(:integer).default(DEFAULT_RETRY_TIMES) - optional(:retry_interval).value(:integer).default(DEFAULT_RETRY_INTERVAL) + optional(:pagination_limit).value(:integer).default(Mihari.config.pagination_limit) + optional(:retry_times).value(:integer).default(Mihari.config.retry_times) + optional(:retry_interval).value(:integer).default(Mihari.config.retry_interval) end AnalyzerWithoutAPIKey = Dry::Schema.Params do required(:analyzer).value(Types::String.enum("dnstwister")) required(:query).value(:string) @@ -70,9 +71,18 @@ Crtsh = Dry::Schema.Params do required(:analyzer).value(Types::String.enum("crtsh")) required(:query).value(:string) optional(:exclude_expired).value(:bool).default(true) + optional(:options).hash(AnalyzerOptions) + end + + HunterHow = Dry::Schema.Params do + required(:analyzer).value(Types::String.enum("hunterhow")) + required(:query).value(:string) + required(:start_time).value(:date) + required(:end_time).value(:date) + optional(:api_key).value(:string) optional(:options).hash(AnalyzerOptions) end Feed = Dry::Schema.Params do required(:analyzer).value(Types::String.enum("feed"))