chessdotcom.endpoints.player_current_games¶
Array of Daily Chess games that a player is currently playing.
API doc: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-current
- chessdotcom.endpoints.player_current_games.get_player_current_games(username: str, tts=0, **request_options) GetPlayerCurrentGamesResponse¶
- Parameters:
username – username of the player.
tts – the time the client will wait before making the first request.
- Returns:
GetPlayerCurrentGamesResponseobject containing a list of Daily Chess games that a player is currently playing.
- class chessdotcom.endpoints.player_current_games.GetPlayerCurrentGamesResponse(json: dict, text: str, games: list)¶
- Variables:
games – Array of
Game`objects.json – The JSON response from the API.
text – The raw text response from the API.
- class chessdotcom.endpoints.player_current_games.Game(url: str | None, move_by: int | None, pgn: str | None, time_control: str | None, start_time: int | None, last_activity: int | None, rated: bool | None, turn: str | None, fen: str | None, time_class: str | None, rules: str | None, white: str | None, black: str | None, draw_offer: str | None)¶
- Variables:
url – The URL of the game.
move_by – The timestamp by which the next move must be made.
pgn – The PGN (Portable Game Notation) of the game.
time_control – The time control setting of the game.
start_time – The start time of the game as a timestamp.
last_activity – The timestamp of the last activity in the game.
rated – Indicates if the game is rated.
turn – The player whose turn it is to move.
fen – The FEN (Forsyth-Edwards Notation) of the current game state.
time_class – The time class of the game (e.g., blitz, bullet).
rules – The ruleset being used for the game.
white – The username of the player with the white pieces.
black – The username of the player with the black pieces.
draw_offer – Player who has made a draw offer