chessdotcom.endpoints.player_games_by_month¶
List of Live and Daily Chess games that a player has finished.
API doc: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-archive
- chessdotcom.endpoints.player_games_by_month.get_player_games_by_month(username: str, year: str | int | None = None, month: str | int | None = None, datetime_obj: datetime | None = None, tts=0, **request_options) GetPlayerGamesByMonthResponse¶
- Parameters:
username – username of the player.
year – the year (yyyy).
month – the month (mm).
date – datetime.datetime of the month. Can be passed in instead of month and year parameters.
tts – the time the client will wait before making the first request.
- Returns:
GetPlayerGamesByMonthResponseobject containing a list of live and daily Chess games that a player has finished.
- class chessdotcom.endpoints.player_games_by_month.GetPlayerGamesByMonthResponse(json, text, games)¶
- Variables:
json – The JSON response from the API.
text – The raw text response from the API.
games – A list of
Gameobjects.
- class chessdotcom.endpoints.player_games_by_month.Game(url: str | None, pgn: str | None, time_control: str | None, start_time: int | None, end_time: int | None, accuracies: Accuracies | None, tcn: str | None, uuid: str | None, initial_setup: str | None, fen: str | None, time_class: str | None, rules: str | None, eco: str | None, white: PlayerStats | None, black: PlayerStats | None)¶
- Variables:
url – URL of the game.
pgn – PGN (Portable Game Notation) of the game.
time_control – Time control of the game.
start_time – Start time of the game in epoch format.
end_time – End time of the game in epoch format.
accuracies –
Accuracies: accuracies of the players in the game.tcn – TCN (Tournament Chess Notation) of the game.
uuid – UUID of the game.
initial_setup – Initial setup of the game in FEN format.
fen – FEN (Forsyth-Edwards Notation) of the game.
time_class – Time class of the game.
rules – Rules of the game.
eco – ECO (Encyclopaedia of Chess Openings) code of the game.
white –
PlayerStats: stats of the white player.black –
PlayerStats: stats of the black player.
- class chessdotcom.endpoints.player_games_by_month.Accuracies(white: str | None, black: str | None)¶
- Variables:
white – Accuracy score for the white player.
black – Accuracy score for the black player.
- class chessdotcom.endpoints.player_games_by_month.PlayerStats(rating: int | None, result: str | None, username: str | None, id: str | None, uuid: str | None)¶
- Variables:
rating – The player’s rating.
result – The result of the game for the player.
username – The username of the player.
id – The ID of the player.
uuid – The UUID of the player.