chessdotcom.endpoints.player_current_games_to_move¶
Daily Chess games where it is the player’s turn to act.
API doc: https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-tomove
- chessdotcom.endpoints.player_current_games_to_move.get_player_current_games_to_move(username: str, tts=0, **request_options) GetPlayerCurrentGamesToMoveResponse¶
- Parameters:
username – username of the player.
tts – the time the client will wait before making the first request.
- Returns:
GetPlayerCurrentGamesToMoveResponseobject containing a list of Daily Chess games where it is the player’s turn to act.
- class chessdotcom.endpoints.player_current_games_to_move.GetPlayerCurrentGamesToMoveResponse(json, text, games)¶
- Variables:
json – The JSON response from the API.
text – The raw text response from the API.
games – List of
Gameobjects.
- class chessdotcom.endpoints.player_current_games_to_move.Game(url: str | None, move_by: int | None, last_activity: int | None, draw_offer: bool | None)¶
- Variables:
url – URL for the game.
move_by – Time when the player must make a move.
last_activity – Time of the last activity in the game.
draw_offer – True if the player has offered a draw.
move_by_datetime – Time when the player must make a move as a datetime object.
last_activity_datetime – Time of the last activity in the game as a datetime object.