lib/mihari/clients/hunterhow.rb in mihari-5.4.9 vs lib/mihari/clients/hunterhow.rb in mihari-5.5.0
- old
+ new
@@ -12,17 +12,23 @@
#
# @param [String] base_url
# @param [String, nil] api_key
# @param [Hash] headers
- # @param [Integer, nil] interval
+ # @param [Integer] pagination_interval
# @param [Integer, nil] timeout
#
- def initialize(base_url = "https://api.hunter.how/", api_key:, headers: {}, interval: nil, timeout: nil)
+ def initialize(
+ base_url = "https://api.hunter.how/",
+ api_key:,
+ headers: {},
+ pagination_interval: 0,
+ timeout: nil
+ )
raise(ArgumentError, "'api_key' argument is required") unless api_key
- super(base_url, headers: headers, interval: interval, timeout: timeout)
+ super(base_url, headers: headers, pagination_interval: pagination_interval, timeout: timeout)
@api_key = api_key
end
#
@@ -75,10 +81,10 @@
y.yield res
break if res.data.list.length < page_size
- sleep_interval
+ sleep_pagination_interval
end
end
end
end
end