Module: Firecrawl

Extended by:
ModuleMethods
Defined in:
lib/firecrawl.rb,
lib/firecrawl/helpers.rb,
lib/firecrawl/request.rb,
lib/firecrawl/version.rb,
lib/firecrawl/map_result.rb,
lib/firecrawl/map_options.rb,
lib/firecrawl/map_request.rb,
lib/firecrawl/crawl_result.rb,
lib/firecrawl/error_result.rb,
lib/firecrawl/crawl_options.rb,
lib/firecrawl/crawl_request.rb,
lib/firecrawl/scrape_result.rb,
lib/firecrawl/module_methods.rb,
lib/firecrawl/scrape_options.rb,
lib/firecrawl/scrape_request.rb,
lib/firecrawl/response_methods.rb,
lib/firecrawl/batch_scrape_result.rb,
lib/firecrawl/batch_scrape_options.rb,
lib/firecrawl/batch_scrape_request.rb

Defined Under Namespace

Modules: Helpers, ModuleMethods, ResponseMethods Classes: BatchScrapeOptions, BatchScrapeRequest, BatchScrapeResult, CrawlOptions, CrawlRequest, CrawlResult, ErrorResult, MapOptions, MapRequest, MapResult, Request, ScrapeOptions, ScrapeRequest, ScrapeResult, ScrapeResultData

Constant Summary collapse

VERSION =
'0.3.0'
MapResultSchema =
DynamicSchema::Struct.define do
  success             [ TrueClass, FalseClass ]
  links               array: true do 
    url               String 
    title             String 
    description       String 
  end              
end
CrawlResultSchema =
DynamicSchema::Struct.define do
  success             [ TrueClass, FalseClass ]
  id                  String
  total               Integer
  completed           Integer
  credits_used        Integer, as: :creditsUsed
  url                 String
  _value              :next, type: String
  expires_at          Date, as: :expiresAt
  data                ScrapeResultData, array: true, default: []
end
ScrapeResultDataSchema =
DynamicSchema::Struct.define do
              Hash

  markdown            String
  html                String 
  raw_html            String,           as: :rawHtml

  screenshot_url      String,           as: :screenshot
  links               String,           array: true
  actions             Hash,             default: {}

  warning             String
end
ScrapeResultSchema =
DynamicSchema::Struct.define do
  success             [ TrueClass, FalseClass ]
  data                ScrapeResultData
end
BatchScrapeResultSchema =
DynamicSchema::Struct.define do
  success             [ TrueClass, FalseClass ]
  id                  String
  invalid_urls        String, array: true

  total               Integer
  completed           Integer
  credits_used        Integer, as: :creditsUsed

  url                 String
  _value              :next, type: String
  
  expires_at          Date, as: :expiresAt
  data                ScrapeResultData, array: true, default: []
end

Constants included from ModuleMethods

ModuleMethods::DEFAULT_CONNECTION

Method Summary

Methods included from ModuleMethods

api_key, connection, scrape