You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: drop game_state from opportunity models + add gamestate resource (v0.2.6) (#5)
* feat!: drop game_state from opportunity models (v0.3.0)
The API server no longer emits a `game_state` object on the EV,
arbitrage, or low-hold response paths. Live game state (scores,
period, clock) is served exclusively by `/api/v1/gamestate` and the
`gamestate` stream channel — correlate by `event_id`.
- Remove `game_state` from ArbitrageOpportunity, MiddleOpportunity,
and LowHoldOpportunity.
- Remove vestigial `home_score`, `away_score`, `game_period`,
`game_clock` fields from OddsLine (the /api/v1/odds endpoint
never populated them).
- Keep the `GameState` model exported for users consuming the
gamestate endpoint.
- Bump 0.2.5 -> 0.3.0.
BREAKING CHANGE: code that read `arb.game_state`, `lh.game_state`,
or `mid.game_state` will need to fetch state via the gamestate
endpoint and join by `event_id`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(gamestate): add gamestate resource + stream method
The previous commit dropped `game_state` from EV / arb / low-hold rows.
This adds a first-class replacement: `client.gamestate.get(sport=...)`
fetches `/api/v1/gamestate{/<sport>}` and parses the response into a
`{sport: {event_id: GameState}}` map. Mirrored on the async client
and as `client.stream.gamestate()` for SSE.
The `GameState` model is rewritten to match what the gamestate endpoint
actually emits — `home_score`, `away_score`, `game_period`, `game_clock`,
`primary_book`, `book_count`, `stale`, `aggregator_stale` (plus team /
sport pass-through). `extra="allow"` keeps adapter-specific fields from
being silently dropped.
Bundled with the v0.3.0 breaking change so users have a clean migration:
where they used to read `arb.game_state.period`, they now do
``state[opp.sport][opp.event_id].game_period`` after a single
`client.gamestate.get()` per refresh.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(version): bump 0.2.5 -> 0.2.6 (patch, not minor)
Earlier commit jumped to 0.3.0 to flag the breaking change. Project
preference is to use 0.0.1 patch bumps; switch the version on this
branch back to 0.2.6 so the release line stays continuous. The drop
of `game_state` from EV / arb / low-hold rows is still highlighted as
BREAKING in the commit message and PR — semver-strict downstreams
should pin accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments