Class: Firecrawl::Models::BatchScrapeOptions
- Inherits:
-
Object
- Object
- Firecrawl::Models::BatchScrapeOptions
- Defined in:
- lib/firecrawl/models/batch_scrape_options.rb
Overview
Options for a batch scrape job.
Constant Summary collapse
- FIELDS =
%i[ options webhook append_to_id ignore_invalid_urls max_concurrency zero_data_retention idempotency_key integration ].freeze
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ BatchScrapeOptions
constructor
A new instance of BatchScrapeOptions.
- #to_h ⇒ Object
Constructor Details
#initialize(**kwargs) ⇒ BatchScrapeOptions
Returns a new instance of BatchScrapeOptions.
14 15 16 |
# File 'lib/firecrawl/models/batch_scrape_options.rb', line 14 def initialize(**kwargs) FIELDS.each { |f| instance_variable_set(:"@#{f}", kwargs[f]) } end |
Instance Method Details
#to_h ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/firecrawl/models/batch_scrape_options.rb', line 18 def to_h { "options" => &.to_h, "webhook" => webhook.is_a?(String) ? webhook : webhook&.to_h, "appendToId" => append_to_id, "ignoreInvalidURLs" => ignore_invalid_urls, "maxConcurrency" => max_concurrency, "zeroDataRetention" => zero_data_retention, "integration" => integration, }.compact end |