Skip to content

Commit c7a759e

Browse files
authored
docs(leagues): replace stale Leagues-by-Sport table with live-endpoint pointer (#219)
The hand-maintained "Leagues by Sport" table covered 16 leagues across 8 sports against the atlas registry's 600+ entries. Two problems: 1. Drift trap: required manual update on every registry addition. Last comprehensive ~12 months ago, silently shrinking in coverage relative to the actual catalog. 2. Wrong canonical IDs: showed `epl`, `la_liga`, `serie_a`, `bundesliga`, `mls` — none are the registry's canonical slug forms (`england_-_premier_league`, `spain_-_la_liga`, `italy_-_serie_a`, `germany_-_bundesliga`, `usa_-_major_league_soccer`). The API does accept short forms for backward compat, but `/leagues` returns the canonical slug and other endpoints emit it on response payloads — clients coding to the doc example see mismatches. Replaced with a "Common Leagues" section that: - Is honest about being illustrative not exhaustive - Uses canonical slug form for soccer (the most affected sport) - Adds programmatic-access guidance ("never hard-code a list, call /api/v1/leagues") in the callout - Mentions registry breadth (600+ leagues / 30+ sports) so readers understand the table is a tiny subset Closes the last of 4 drift traps in League Normalization Item #3 (api-adapters#538, sharp-api-go#367, sharpapi-site#87, this PR).
1 parent 9923878 commit c7a759e

1 file changed

Lines changed: 15 additions & 48 deletions

File tree

content/en/api-reference/leagues.mdx

Lines changed: 15 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -255,58 +255,25 @@ for league in result['data']:
255255
| `event_count` | integer | Total events currently available with odds |
256256
| `live_count` | integer | Events currently live/in-play |
257257

258-
## Leagues by Sport
258+
## Common Leagues
259259

260-
### Basketball
261-
| ID | Display Name | Description |
262-
|----|-------------|-------------|
263-
| `nba` | NBA | National Basketball Association |
264-
| `ncaab` | NCAAB | NCAA Men's Basketball |
265-
| `wnba` | WNBA | Women's National Basketball Association |
260+
The endpoint is the canonical source of truth — call `GET /api/v1/leagues` for the complete, up-to-date list. The atlas registry catalogs **600+ leagues across 30+ sports** including UEFA continental competitions, multiple basketball circuits per country, and full tennis/golf/MMA/esports/cricket coverage. The illustrative subset below shows the highest-volume entries you'll typically filter on:
266261

267-
### Football
268-
| ID | Display Name | Description |
269-
|----|-------------|-------------|
270-
| `nfl` | NFL | National Football League |
271-
| `ncaaf` | NCAAF | NCAA Football |
272-
273-
### Hockey
274-
| ID | Display Name | Description |
275-
|----|-------------|-------------|
276-
| `nhl` | NHL | National Hockey League |
277-
278-
### Baseball
279-
| ID | Display Name | Description |
280-
|----|-------------|-------------|
281-
| `mlb` | MLB | Major League Baseball |
282-
283-
### Soccer
284-
| ID | Display Name | Description |
285-
|----|-------------|-------------|
286-
| `epl` | English Premier League | English Premier League |
287-
| `la_liga` | La Liga | Spanish La Liga |
288-
| `serie_a` | Serie A | Italian Serie A |
289-
| `bundesliga` | Bundesliga | German Bundesliga |
290-
| `mls` | MLS | Major League Soccer |
291-
292-
### Tennis
293-
| ID | Display Name | Description |
294-
|----|-------------|-------------|
295-
| `atp` | ATP | Association of Tennis Professionals |
296-
| `wta` | WTA | Women's Tennis Association |
297-
298-
### MMA
299-
| ID | Display Name | Description |
300-
|----|-------------|-------------|
301-
| `ufc` | UFC | Ultimate Fighting Championship |
302-
303-
### Golf
304-
| ID | Display Name | Description |
305-
|----|-------------|-------------|
306-
| `pga` | PGA Tour | Professional Golfers' Association Tour |
262+
| Sport | Common league IDs |
263+
|-------|-------------------|
264+
| Basketball | `nba`, `ncaab`, `wnba` |
265+
| Football | `nfl`, `ncaaf` |
266+
| Hockey | `nhl` |
267+
| Baseball | `mlb` |
268+
| Soccer | `england_-_premier_league`, `spain_-_la_liga`, `italy_-_serie_a`, `germany_-_bundesliga`, `france_-_ligue_1`, `uefa_-_champions_league`, `usa_-_major_league_soccer` |
269+
| Tennis | `atp`, `wta`, `atp_challenger`, `itf_men`, `itf_women` |
270+
| MMA | `ufc`, `pfl` |
271+
| Golf | `pga`, `liv`, `dp_world_tour`, `lpga` |
307272

308273
<Callout type="info">
309-
The `event_count` and `live_count` values are dynamic. Off-season leagues (e.g., MLB in winter, WNBA in fall) will show 0 events.
274+
- League IDs use canonical slug form (`england_-_premier_league`, not `epl`). Some short forms are accepted as filter input for backward compatibility, but the canonical slug is what `/leagues` returns and what other endpoints emit on response payloads.
275+
- The `event_count` and `live_count` values are dynamic. Off-season leagues (e.g., MLB in winter, WNBA in fall) show 0 events but stay in the catalog.
276+
- For programmatic access (e.g. building dropdown filters), call `/api/v1/leagues` and use the response — never hard-code a list.
310277
</Callout>
311278

312279
## Using Leagues in Filters

0 commit comments

Comments
 (0)