Base API Processor Class
Base API Processor Class
Details
Abstract base class for API processors that provides common functionality including unified logging, error handling, input processing, and response validation. This eliminates code duplication across all provider-specific processors.
Public fields
provider_name
Name of the API provider
logger
Unified logger instance
base_url
Custom base URL for API endpoints
Methods
Method new()
Initialize the base API processor
Usage
BaseAPIProcessor$new(provider_name, base_url = NULL)
Method get_default_api_url()
Abstract method to be implemented by subclasses for getting default API URL
Method make_api_call()
Abstract method to be implemented by subclasses for making the actual API call
Method extract_response_content()
Abstract method to be implemented by subclasses for extracting content from response