Spaces:
Sleeping
Sleeping
Download apps/ruby-sdk/lib/firecrawl/models/map_options.rb from s-eto-hub/firecrawl-api: direct link, hf CLI and curl.
- Browser
- Download file 851 Bytes
-
https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/ruby-sdk/lib/firecrawl/models/map_options.rb
- Command line
-
hf download hf://spaces/s-eto-hub/firecrawl-api/apps/ruby-sdk/lib/firecrawl/models/map_options.rb
-
curl -L -o map_options.rb https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/ruby-sdk/lib/firecrawl/models/map_options.rb
851 Bytes
| # frozen_string_literal: true | |
| module Firecrawl | |
| module Models | |
| # Options for mapping (discovering URLs on) a website. | |
| class MapOptions | |
| FIELDS = %i[ | |
| search sitemap include_subdomains ignore_query_parameters | |
| limit timeout integration location | |
| ].freeze | |
| attr_reader(*FIELDS) | |
| def initialize(**kwargs) | |
| FIELDS.each { |f| instance_variable_set(:"@#{f}", kwargs[f]) } | |
| end | |
| def to_h | |
| { | |
| "search" => search, | |
| "sitemap" => sitemap, | |
| "includeSubdomains" => include_subdomains, | |
| "ignoreQueryParameters" => ignore_query_parameters, | |
| "limit" => limit, | |
| "timeout" => timeout, | |
| "integration" => integration, | |
| "location" => location.is_a?(Hash) ? location : location&.to_h, | |
| }.compact | |
| end | |
| end | |
| end | |
| end | |