Client-side helpers over the Sports schedule endpoints: collecting fixtures
across the paginated prematch schedule, and filtering sport events by their
liveodds booking state.
These compose over the raw endpoints in UOF.API.Sports.
Summary
Functions
Sport events that can be booked for live odds.
Sport events already booked for live odds.
Sport events available to buy.
Stream fixtures restricted to the given sport name(s).
Lazily stream every fixture Betradar offers prematch odds for.
Filter a schedule's sport events by their liveodds booking state (e.g.
"bookable", "booked", "buyable", "not_available").
Functions
Sport events that can be booked for live odds.
Sport events already booked for live odds.
Sport events available to buy.
Stream fixtures restricted to the given sport name(s).
Lazily stream every fixture Betradar offers prematch odds for.
Pages of the prematch schedule are fetched on demand, so this composes with
Stream/Enum and supports early termination:
Sports.Fixtures.stream() |> Stream.map(& &1.id) |> Enum.take(50)
Filter a schedule's sport events by their liveodds booking state (e.g.
"bookable", "booked", "buyable", "not_available").
Accepts a schedule struct (such as the one returned by UOF.API.Sports.schedule/2)
or a plain list of sport events. The state values are not enumerated by the
schema, so prefer this for any value beyond the named shortcuts below.