chessdotcom.endpoints.team_match¶
Get details about a team match and players playing that match. After the match is finished there will be a link to each player’s stats endpoint, in order to get up-to-date information about the player.
API doc: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-match-profile
- chessdotcom.endpoints.team_match.get_team_match(match_id: int, tts=0, **request_options) GetTeamMatchResponse¶
- Parameters:
match_id – the id of the match.
tts – the time the client will wait before making the first request.
- Returns:
GetTeamMatchResponseobject containing details about a team match and players playing that match.
- class chessdotcom.endpoints.team_match.GetTeamMatchResponse(json, text, match)¶
- Variables:
match – Holds the
TeamMatchobject.json – The JSON response from the API.
text – The raw text response from the API.
- class chessdotcom.endpoints.team_match.TeamMatch(name: str | None, url: str | None, id: str | None, status: str | None, start_time: int | None, end_time: int | None, boards: int | None, settings: TeamMatchSettings, teams: Teams)¶
- Variables:
name – The name of the match.
url – The URL of the match.
id – The unique identifier of the match.
status – The current status of the match.
start_time – The start time of the match in Unix timestamp.
end_time – The end time of the match in Unix timestamp.
boards – The number of boards in the match.
settings – The settings of the team match. Holds the
TeamMatchSettingsobject.teams – The teams participating in the match. Holds the
Teamsobject.start_datetime – The start time of the match as a datetime object.
end_datetime – The end time of the match as a datetime object.
- class chessdotcom.endpoints.team_match.TeamMatchSettings(rules: str | None, time_class: str | None, time_control: str | None, min_team_players: int | None, max_team_players: int | None, min_required_games: int | None, min_rating: int | None, max_rating: int | None, autostart: bool | None)¶
- Variables:
rules – The rules of the match.
time_class – The time class of the match.
time_control – The time control of the match.
min_team_players – The minimum number of players required in the team.
max_team_players – The maximum number of players required in the team.
min_required_games – The minimum number of games required to finish the match.
min_rating – The minimum rating required to participate in the match.
max_rating – The maximum rating required to participate in the match.
autostart – Whether the match will start automatically.
- class chessdotcom.endpoints.team_match.Team(id: str | None, name: str | None, url: str | None, score: float | None, result: str | None, players: list[Player])¶
- Variables:
id – The unique identifier of the team.
name – The name of the team.
url – The URL of the team.
score – The score of the team.
result – The result of the team.
players – List of
Playerobjects.
- class chessdotcom.endpoints.team_match.Player(username: str | None, board: str | None, stats: str | None, status: str | None, played_as_black: str | None, played_as_white: str | None, rating: int | None, timeout_percent: float | None)¶
- Variables:
username – The username of the player.
board – The board the player is playing on.
stats – The stats of the player.
status – The status of the player.
played_as_black – The result {win, lose, resign, etc.} of player when played as black.
played_as_white – The result {win, lose, resign, etc.} of player when played as white.
rating – The rating of the player.
timeout_percent – The timeout percentage of the player