chessdotcom.endpoints.player_stats¶
Ratings, win/loss, and other stats about a player’s game play, tactics, lessons and Puzzle Rush score.
API doc: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-player-stats
- chessdotcom.endpoints.player_stats.get_player_stats(username: str, tts=0, **request_options) GetPlayerStatsResponse¶
- Parameters:
username – username of the player.
tts – the time the client will wait before making the first request.
- Returns:
GetPlayerStatsResponse: information about the plyers’s ratings, win/loss, and other stats.
- class chessdotcom.endpoints.player_stats.GetPlayerStatsResponse(json: dict, text: str, stats: PlayerStats)¶
- Variables:
stats – Holds the
PlayerStatsobject.json – The JSON response from the API.
text – The raw text response from the API.
- class chessdotcom.endpoints.player_stats.PlayerStats(fide: int | None, chess_daily: GameStats | None, chess960_daily: GameStats | None, chess_rapid: GameStats | None, chess_bullet: GameStats | None, chess_blitz: GameStats | None, tactics: TacticStats | None, puzzle_rush: PuzzleRushStats | None)¶
- Variables:
fide – The FIDE rating of the player.
chess_daily –
GameStats: the player’s statistics in daily chess games.chess960_daily –
GameStats: the player’s statistics in daily chess960 games.chess_rapid –
GameStats: the player’s statistics in rapid chess games.chess_bullet –
GameStats: the player’s statistics in bullet chess games.chess_blitz –
GameStats: the player’s statistics in blitz chess games.tactics –
TacticStats: the player’s statistics in chess tactics.puzzle_rush –
PuzzleRushStats: the player’s statistics in puzzle rush challenges.
- class chessdotcom.endpoints.player_stats.GameStats(last: LastGameStats, best: BestGameStats, record: RecordGameStats, tournament: TournamentGameStats | None)¶
- Variables:
last –
LastGameStats: the player’s last game statistics.best –
BestGameStats: the player’s best game statistics.record –
RecordGameStats: the player’s record game statistics.tournament –
TournamentGameStats: the player’s tournament game statistics
- class chessdotcom.endpoints.player_stats.LastGameStats(rating: int | None, date: int | None, rd: int | None)¶
- Variables:
rating – The rating of the last game.
date – The date of the last game.
rd – The rating deviation of the last game.
datetime – The datetime representation of the date.
- class chessdotcom.endpoints.player_stats.BestGameStats(rating: int | None, date: int | None, game: str | None)¶
- Variables:
rating – The rating of the best game.
date – The date of the best game.
game – The URL or identifier of the best game.
datetime – The datetime representation of the date.
- class chessdotcom.endpoints.player_stats.RecordGameStats(win: int | None, loss: int | None, draw: int | None)¶
- Variables:
win – Number of wins.
loss – Number of losses.
draw – Number of draws.
- class chessdotcom.endpoints.player_stats.TournamentGameStats(count: int | None, withdraw: int | None, points: float | None, highest_finish: int | None)¶
- Variables:
count – The number of tournament games played.
withdraw – The number of tournaments withdrawn from.
points – The total points accumulated in tournaments.
highest_finish – The highest finish position in a tournament.
- class chessdotcom.endpoints.player_stats.TacticStats(highest: TacticStatsRecord, lowest: TacticStatsRecord)¶
- Variables:
highest –
TacticStatsRecord: the highest tactic stats record.lowest –
TacticStatsRecord: the lowest tactic stats record.
- class chessdotcom.endpoints.player_stats.TacticStatsRecord(rating: int | None, date: int | None)¶
- Variables:
rating – The rating of the tactic stats record.
date – The date of the tactic stats record.
datetime – The datetime representation of the the date.
- class chessdotcom.endpoints.player_stats.PuzzleRushStats(best: PuzzleRushRecord)¶
- Variables:
best –
PuzzleRushRecord: the best puzzle rush stats.
- class chessdotcom.endpoints.player_stats.PuzzleRushRecord(total_attempts: int | None, score: int | None)¶
- Variables:
total_attempts – The total number of attempts made in the puzzle rush.
score – The score achieved in the puzzle rush.