Options
Platform
default:"common-gen5"
Default platform for every request. A method input can override it.
number
default:"15000"
Positive, finite timeout used by the built-in Impit transport.
number
default:"3"
Total attempts for a request, including the first one. Must be an integer from
1 through 5.number
default:"400"
Non-negative, finite initial retry delay. Each retry doubles the previous
backoff delay.
'default' | 'strict'
default:"default"
In
strict mode, reject every HTTP 403 immediately, even when the payload
validates. The default mode accepts a valid 403 payload and retries an invalid
one within maxAttempts. See Errors and retries.ProClubsTransport
Optional request function for tests or custom Node.js runtimes.
boolean | ProClubsCacheOptions
default:"false"
Set to
true for a 60-second memory cache, or provide ttlMs and
maxEntries for advanced control. See Cache and observability.ProClubsEventHandler
Optional local hook for cache, retry, request, and error events. It never
enables telemetry.
ProClubsValidationError synchronously in the constructor.
Per-request platform
Every method that accepts a platform uses this precedence:- the platform supplied in the method input;
- the client default;
common-gen5.
Deprecated platforms
common-gen4 is deprecated. Since the FC 27 switchover, EA rejects it with
HTTP 400 on every endpoint, and the EA rankings page only lists common-gen5
and nx (last checked on 2026-09-30).
The value stays in PLATFORMS and in the Platform type so existing code keeps
compiling. A request that uses it still reaches EA and fails with
ProClubsHttpError (status: 400). Each client emits one Node.js
DeprecationWarning with the code PROCLUBS_DEP001 the first time it sends
such a request.
Custom transport
The default transport uses Impit with a Chrome network profile, so requests look like the ones the EA website sends. EA’s edge refuses or stalls some other clients: on 2026-09-30, curl got an HTTP/2 stream reset, and developers report intermittent 403s and timeouts from servers. You can inject a compatible transport at the HTTP boundary instead, for example plainfetch.
URL, a GET request initializer, and an optional
AbortSignal. Its response must expose status, statusText, ok, headers,
and an asynchronous text() method.