Spaces:
Sleeping
Sleeping
Download apps/ruby-sdk/lib/firecrawl/models/search_data.rb from s-eto-hub/firecrawl-api: direct link, hf CLI and curl.
- Browser
- Download file 534 Bytes
-
https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/ruby-sdk/lib/firecrawl/models/search_data.rb
- Command line
-
hf download hf://spaces/s-eto-hub/firecrawl-api/apps/ruby-sdk/lib/firecrawl/models/search_data.rb
-
curl -L -o search_data.rb https://huggingface.co/spaces/s-eto-hub/firecrawl-api/resolve/main/apps/ruby-sdk/lib/firecrawl/models/search_data.rb
534 Bytes
| # frozen_string_literal: true | |
| module Firecrawl | |
| module Models | |
| # Search results from the v2 search API. | |
| class SearchData | |
| attr_reader :web, :news, :images | |
| def initialize(data) | |
| @web = data["web"] | |
| @news = data["news"] | |
| @images = data["images"] | |
| end | |
| def to_s | |
| web_count = web&.size || 0 | |
| news_count = news&.size || 0 | |
| image_count = images&.size || 0 | |
| "SearchData{web=#{web_count}, news=#{news_count}, images=#{image_count}}" | |
| end | |
| end | |
| end | |
| end | |