chessdotcom.endpoints.leaderboards¶
It displays information about top 50 player for daily and live games, tactics and lessons.
API doc: https://www.chess.com/news/view/published-data-api#pubapi-leaderboards
- chessdotcom.endpoints.leaderboards.get_leaderboards(tts=0, **request_options) GetLeaderboardsResponse¶
- Parameters:
tts – the time the client will wait before making the first request.
- Returns:
GetLeaderboardsResponseobject containing information about top 50 player for daily and live games, tactics and lessons.
- class chessdotcom.endpoints.leaderboards.GetLeaderboardsResponse(json, text, leaderboards)¶
- Variables:
json – The JSON response from the API.
text – The raw text response from the API.
leaderboards – Holds the
Leaderboardsobject.
- class chessdotcom.endpoints.leaderboards.Leaderboards(daily: List[Leaderboard], daily960: List[Leaderboard], live_rapid: List[Leaderboard], live_blitz: List[Leaderboard], live_bullet: List[Leaderboard], live_bughouse: List[Leaderboard], live_threecheck: List[Leaderboard], live_crazyhouse: List[Leaderboard], live_kingofthehill: List[Leaderboard], live_tactics: List[Leaderboard], live_rush: List[Leaderboard], live_battle: List[Leaderboard], rush: List[Leaderboard], tactics: List[Leaderboard], live_blitz960: List[Leaderboard], battle: List[Leaderboard])¶
- Variables:
daily – List of
Leaderboardobjects representing leaders in daily format.daily960 – List of
Leaderboardobjects representing leaders in daily960 format.live_rapid – List of
Leaderboardobjects representing leaders in live rapid format.live_blitz – List of
Leaderboardobjects representing leaders in live blitz format.live_bullet – List of
Leaderboardobjects representing leaders in live bullet format.live_bughouse – List of
Leaderboardobjects representing leaders in live bughouse format.live_blitz960 – List of
Leaderboardobjects representing leaders in live blitz960 format.live_threecheck – List of
Leaderboardobjects representing leaders in live threecheck format.live_crazyhouse – List of
Leaderboardobjects representing leaders in live crazyhouse format.live_kingofthehill – List of
Leaderboardobjects representing leaders in live kingofthehill format.live_tactics – List of
Leaderboardobjects representing leaders in live tactics format.live_rush – List of
Leaderboardobjects representing leaders in live rush format.live_battle – List of
Leaderboardobjects representing leaders in live battle format.rush – List of
Leaderboardobjects representing leaders in rush format.tactics – List of
Leaderboardobjects representing leaders in tactics format.live_blitz960 – List of
Leaderboardobjects representing leaders in live blitz960 format.battle – List of
Leaderboardobjects representing leaders in battle format.
- class chessdotcom.endpoints.leaderboards.Leaderboard(player_id: int | None, id: str | None, url: str | None, username: str | None, score: int | None, rank: int | None, country: str | None, title: str | None, name: str | None, status: str | None, avatar: str | None, flair_code: str | None, win_count: int | None, loss_count: int | None, draw_count: int | None, trend_score: TrendScore | None, trend_rank: TrendRank | None)¶
- Variables:
player_id – Player ID.
id – Unique identifier.
url – URL of the player’s profile.
username – Player’s username.
score – Player’s score.
rank – Player’s rank.
country – Player’s country.
title – Player’s title.
name – Player’s name.
status – Player’s status.
avatar – URL of the player’s avatar.
flair_code – Player’s flair code.
win_count – Number of wins.
loss_count – Number of losses.
draw_count – Number of draws.
trend_score –
TrendScoreobject.trend_rank –
TrendRank object.
- class chessdotcom.endpoints.leaderboards.TrendScore(direction: int | None, delta: int | None)¶
- Variables:
direction – Direction of the trend.
delta – Change in score.
- class chessdotcom.endpoints.leaderboards.TrendRank(direction: int | None, delta: int | None)¶
- Variables:
direction – Direction of the trend.
delta – Change in score.