:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
from dataclasses import dataclass, field
from products.warehouse_sources.sources.sdk import UNVERSIONED_API_VERSION, IncrementalField
# Simplecast's live REST API is labeled "2.0" (same https://api.simplecast.com host and Bearer
# auth the client already uses). UNVERSIONED_API_VERSION ("v1") is the framework placeholder that
# pre-versioning source rows carry; both labels resolve to the one available API, so no request
# branches on the version yet. Simplecast has announced but not shipped header-based version
# selection, so wiring the version onto requests is deferred until that contract is known.
SIMPLECAST_API_VERSION_2_0 = "2.0"
SUPPORTED_VERSIONS = (UNVERSIONED_API_VERSION, SIMPLECAST_API_VERSION_2_0)
DEFAULT_VERSION = SIMPLECAST_API_VERSION_2_0
@dataclass(frozen=False)
class SimpleCastEndpointConfig:
name: str
path: str
# Simplecast resource IDs are globally unique UUIDs, so `id` is a safe primary key.
primary_keys: list[str] = field(default_factory=lambda: ["id"])
# Simplecast top-level list endpoints. Only account-level lists that need no parent id are
# included; per-podcast resources (episodes, analytics, seasons) are fan-out endpoints and are
# intentionally excluded from v1. All are full-refresh only: Simplecast exposes no documented
# server-side timestamp/cursor filter, so there is no incremental cursor to advance safely.
SIMPLECAST_ENDPOINTS: dict[str, SimpleCastEndpointConfig] = {
"podcasts": SimpleCastEndpointConfig(name="podcasts", path="/podcasts"),
}
ENDPOINTS = tuple(SIMPLECAST_ENDPOINTS.keys())
INCREMENTAL_FIELDS: dict[str, list[IncrementalField]] = {}