Optionalshared: EPSharedResourcesProtected ReadonlybaseEuropean Parliament API base URL.
Protected ReadonlycacheLRU cache for API responses.
Protected ReadonlyenableEnable automatic retry on transient failures.
Protected ReadonlymaxMaximum allowed response body size in bytes.
Protected ReadonlymaxMaximum number of retry attempts.
Protected ReadonlyrateToken bucket rate limiter.
Protected ReadonlytimeoutRequest timeout in milliseconds.
Clears all entries from the LRU cache.
ProtectedgetProtectedExecutes a cached, rate-limited GET request to the EP API.
Expected response type (extends Record<string, unknown>)
API endpoint path (relative to baseURL)
Optionalparams: Record<string, unknown>Optional query parameters
OptionalminimumTimeoutMs: numberOptional per-request minimum timeout in milliseconds.
When provided, the effective timeout is Math.max(minimumTimeoutMs, this.timeoutMs),
so the global timeout (set via --timeout or EP_REQUEST_TIMEOUT_MS) can still
extend it beyond the per-endpoint minimum.
Use for known slow EP API endpoints such as procedures/feed and events/feed.
Promise resolving to the typed API response
Returns a single adopted text by document ID.
EP API Endpoint: GET /adopted-texts/{doc-id}
Returns adopted texts.
EP API Endpoint: GET /adopted-texts
year, limit, offset
Retrieves recently updated adopted texts via the feed endpoint.
EP API Endpoint: GET /adopted-texts/feed
Returns cache statistics for monitoring and debugging.
{ size, maxSize, hitRate, hits, misses }
Returns a single procedure by ID.
The EP API wraps single-item responses in a JSON-LD data array,
so this method extracts data[0] before transforming.
EP API Endpoint: GET /procedures/{process-id}
Procedure process-id in "YYYY-NNNN" format (e.g. "2024-0006").
This is different from the human-readable Procedure.id ("COD/YYYY/NNNN") or
Procedure.reference ("YYYY/NNNN(COD)") fields.
Returns events linked to a procedure.
EP API Endpoint: GET /procedures/{process-id}/events
Procedure process ID
limit, offset
Returns legislative procedures.
EP API Endpoint: GET /procedures
year, limit, offset
Paginated list of procedures
Retrieves recently updated procedures via the feed endpoint.
EP API Endpoint: GET /procedures/feed
Note: The EP API procedures/feed endpoint is significantly slower
than other feed endpoints and may take 120+ seconds for one-month
timeframes. For one-month, this client applies an extended minimum
timeout automatically, but callers may still need to increase the global
request timeout if the endpoint takes longer to respond.
PrivatetransformPrivatetransformPrivatetransform
Sub-client for legislative procedures and adopted-texts EP API endpoints.