Live game counts per league
Changed onPublic cheap live-per-league read for the HQ sport screen. Source is persisted GameEvent rows (status live), never the vendor fan-out; demo fixtures excluded. A row counts only when startTime is within the last 6 hours (LIVE_STALE_AFTER_MS); older kickoffs and a null startTime are excluded so a finished or vendor-stuck game cannot light the LIVE pill (#909). League resolves via homeTeam.leagueId ?? awayTeam.leagueId; leagueId values are League.id (cuid) matching GET /api/leagues. Default shape { leagues: [{ leagueId, live }], games: null }; ?include=games adds per-game rows { id, leagueId, homeTeamId, awayTeamId } with ids only (no scores/clocks). Cache: CDN s-maxage=30, stale-while-revalidate=60, stale-if-error=300. (#898)
Request
- Base URLhttps://app.d-sports.org
- Authnone required
Query parameters
Sport filter for the persisted rows. Unknown sport is a 400.
include=games adds per-game rows; any other value is a 400.
Response
{ success, data: { leagues, games } }
Changes
- info
endpoint added
- info