thesportsdb-client

Model

Table of Contents

Classes

ApiRecord
Base class of every record the API returns (Team, Event, ...).
Contract
A player's contract (`lookupcontracts.php`, `lookup/player_contracts`).
Country
A country (`all_countries.php`, `all/countries`). v1 returns only [name] and [flag32].
Equipment
A team kit (`lookupequipment.php`, `lookup/team_equipment`).
Event
A game, match, race or other event. Also used for video highlights.
EventResult
One competitor's result in an individual-sport event: a race, a golf tournament, a fight. Returned both per player (`playerresults.php`) and per event (`eventresults.php`).
EventStat
One team statistic for an event, home vs away (`lookupeventstats.php`, `lookup/event_stats`).
FormerTeam
A team a player used to play for (`lookupformerteams.php`, `lookup/player_teams`).
Honour
A trophy a player won (`lookuphonours.php`, `lookup/player_honours`).
League
A league or cup. Lists (`all_leagues.php`, v2 `search/league`) fill only a few fields; look it up by id for the rest.
LeagueRef
A league a team plays in: one of idLeague/strLeague .. idLeague7/strLeague7.
LineupEntry
One player in an event's lineup (`lookuplineup.php`, `lookup/event_lineup`).
LiveScore
A game in progress (`livescore.php`, `livescore/...`).
Milestone
A career milestone or award (`lookupmilestones.php`, `lookup/player_milestones`).
Player
A player, manager or other person. Search and list endpoints fill only some fields; look the player up by id for the rest.
PlayerExternalIds
Ids of the same player in other databases.
PlayerStat
One statistic for a player in one season (`lookupplayerstats.php`, `lookup/player_stats`).
Season
A season of a league (`search_all_seasons.php`, `list/seasons`).
SeasonPoster
One season poster or badge uploaded for a league (v2 `list/seasonposters`). A season can have several; each is a separate piece of artwork with its own id.
Socials
Web and social links. TheSportsDB often gives these without a scheme (www.facebook.com/Arsenal).
Sport
A sport (`all_sports.php`, `all/sports`).
Standing
One row of a league table (`lookuptable.php`). v1 only; there is no v2 equivalent.
Team
A team. Search and list endpoints fill only some fields (v2 `list/teams` has no alternate names, for example); a lookup by id fills them all.
TimelineEntry
A goal, card or substitution during an event (`lookuptimeline.php`, `lookup/event_timeline`).
TvListing
One broadcast of an event on one channel (v1 `lookuptv.php`/`eventstv.php`, v2 `lookup/event_tv`/`filter/tv`).
Venue
A stadium, arena or circuit.

Enums

EventStatus
A broad reading of a strStatus code, so you don't need every sport's codes. Covers the codes in TheSportsDB's data documentation (docs_api_data) for every sport.
ImageSize
Image sizes TheSportsDB serves by appending a path suffix.
RoundStage
The stage a special intRound value stands for (docs_api_data). Other values are ordinary round numbers.
On this page

Search results