chesscom-ts-client
Version:
A TypeScript client for the Chess.com API
46 lines (45 loc) • 1.7 kB
TypeScript
import { PlayerProfile, PlayerStats, PlayerGames, PlayerMonthlyArchives, PlayerGamesToMove, PlayerClubs, PlayerTeamMatches, PlayerTournaments } from "./types";
export declare class ChessComClient {
private axiosInstance;
constructor();
/**
* Get a player's public profile.
* @param username The username of the player.
*/
getPlayerProfile(username: string): Promise<PlayerProfile>;
/**
* Get a player's stats.
* @param username The username of the player.
*/
getPlayerStats(username: string): Promise<PlayerStats>;
/**
* Get a list of a player's games.
* @param username The username of the player.
*/
getPlayerGames(username: string, year: number, monthString: string): Promise<PlayerGames>;
/**
* Get a list of a player's monthly archives.
* @param username The username of the player.
*/
getPlayerMonthlyArchives(username: string): Promise<PlayerMonthlyArchives>;
/**
* Get a list of a player's games to move.
* @param username The username of the player.
*/
getPlayerGamesToMove(username: string): Promise<PlayerGamesToMove>;
/**
* Get a list of clubs a player is in.
* @param username The username of the player.
*/
getPlayerClubs(username: string): Promise<PlayerClubs>;
/**
* Get a list of team matches a player is in.
* @param username The username of the player.
*/
getPlayerTeamMatches(username: string): Promise<PlayerTeamMatches>;
/**
* Get a list of tournaments a player is in.
* @param username The username of the player.
*/
getPlayerTournaments(username: string): Promise<PlayerTournaments>;
}