How crawlbase/crawlbase-ruby works
Main Components Identification
a. Core Components:
• Main API Client
• Specialized API Services:
• Crawling API
• Scraper API
• Leads API
• Screenshots API
• Storage API
[Ruby Applications] --> [Crawlbase Gem]
[Base API Client] <-- [Service-Specific APIs]
[Crawlbase Cloud Services]
Specific Elements
a. Client Interface Layer:
• Main entry points (API classes)
• Initialization flow with token configuration
b. Core Components Layer:
• Base API class (lib/crawlbase/api.rb)
• Individual API service classes
• Shared utilities and configurations
c. External Integration Layer:
• Crawlbase API endpoints
• Different service endpoints (Crawling, Screenshots, Storage, etc.)
Connection and Flow Representation
Use the following conventions:
• Double lines (═) for inheritance relationships
• Blue: Core components
• Green: External services
• Orange: Client applications
• Gray: Utility classes
Detailed Component Breakdown
[Base API Client]
• Token configuration
• HTTP request handling
• Response processing
[Service-Specific APIs]
• Crawling API
• Scraper API
• Leads API
• Screenshots API
• Storage API
[External Services]
• Crawlbase REST APIs
• Storage Services
• Screenshot Services
Important Notes
• Dependency-free nature of the gem
• Error handling flow
• Response object structure
• Authentication token flow
• Different request types (GET/POST)