Schedule

class Schedule

Schedules and results. All times in the returned events are UTC.

Functions

Link copied to clipboard
suspend fun day(date: LocalDate, sport: String? = null, leagueId: Long? = null, leagueName: String? = null): List<Event>

eventsday.php?d= — every event on a (UTC) day, optionally for one sport or one league (leagueId or leagueName). Free key: 3. Premium: the whole day (900+).

Link copied to clipboard
suspend fun leagueNext(leagueId: Long): List<Event>

eventsnextleague.php?id= — a league's next events. Free key: 1.

Link copied to clipboard
suspend fun leaguePast(leagueId: Long): List<Event>

eventspastleague.php?id= — a league's latest results. Free key: 1.

Link copied to clipboard
suspend fun round(leagueId: Long, round: Int, season: String): List<Event>

eventsround.php?id=&r=&s= — every event in one round (matchday) of a season. Undocumented, and free keys only: it answers the free keys (a whole round, e.g. 10 games) but returns HTTP 404 to premium keys. With a premium key, use SportsDbClient.helpers' roundEvents, which filters the v2 season instead.

Link copied to clipboard
suspend fun season(leagueId: Long, season: String): List<Event>

eventsseason.php?id=&s= — a whole season in one call (premium). Free key: 5–15.

Link copied to clipboard
suspend fun teamLast(teamId: Long): List<Event>

eventslast.php?id= — a team's last results. Free key: 1, and home games only.

Link copied to clipboard
suspend fun teamNext(teamId: Long): List<Event>

eventsnext.php?id= — a team's next events. Free key: 1, and home games only.