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

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

说明与用途

作者为 EA Sports Pro Clubs 的非官方 API 开发了 TypeScript SDK,提供类型化访问、漂移检测和代码解码工具。

问题

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