Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

What I learned wrapping EA FC's undocumented Pro Clubs API in TypeScript

Описание и применение

Автор создал TypeScript‑SDK для неофициального API Pro Clubs от EA Sports, обеспечив типизированный доступ к данным, автоматическое обнаружение изменений и удобные функции декодирования кодов.

Задача

EA Sports FC provides no public API for Pro Clubs, yet many tools need club data. The only available data are undocumented JSON endpoints behind the EA Clubs website.

Результат

The SDK enables developers to reliably access Pro Clubs data with typed responses, automatic drift detection, and convenient utilities for decoding codes, while encouraging respectful usage and caching.

Рабочий процесс

  • 1. Identify all public endpoints and their query parameters.
  • 2. Note naming quirks: playoff route is singular, clubIds is plural but accepts a single ID.
  • 3. Implement a Zod schema for each response to enforce contracts and detect drift.
  • 4. Add a compatibility probe to compare live responses with known contracts.
  • 5. Decode numeric codes (e.g., nationality, region) into human‑readable labels.
  • 6. Provide a client class (ProClubsClient) with methods for searching clubs, fetching members, and listing matches.
  • 7. Use Impit with a Chrome network profile as default transport; allow injecting plain fetch.
  • 8. Cache responses opt‑in and support request cancellation via AbortSignal.
  • 9. Publish SDK on GitHub and npm, with documentation and example usage.

Доказательства

EA Sports FC has no public API for Pro Clubs, the mode where each player controls one footballer in an 11-a-side club.

Источник

I wrapped those endpoints in an open-source TypeScript SDK, proclubs-sdk.

Источник

Every endpoint is a GET with a query string. No API key, no EA account, no cookie.

Источник

The SDK's default transport uses ImpIt with a Chrome network profile, so its requests look like the ones the website sends.

Источник

Every response in the SDK goes through a Zod schema.

Источник

The SDK keeps every raw value and adds a readable one next to it: nationality: { id: "115", label: "Gabon", isoCode: "GA" }

Источник

  • Дата записи: 2026-11-04T03:13:49.082Z