chesster

1.0.9 • Public • Published

chesster_logo

Introduction

Do you want to access chess.com API data easily? Chesster is a great solution for that. You can retrieve any kind of data with just 1 function.

Code Samples

Initialize Chesster instance

const chess = new Chesster("123456789"); // Pass in the game id for e.g: https://www.chess.com/game/live/123456789
await chess.initialize(); // Initialize chess instance to retrieve game data

Example of use

const fen = await chess.getFen();

List of functions

Functions Description
getFen() Fetch fen (A FEN string consists of six fields, separated by spaces. Each field provides specific information about the position)
getMoves() Fetch moves
getPGN() Fetch PGN
getWinner() Fetch winner of the chess game
getResultMessage() Fetch result message of the chess game
getElo() Fetch players elo of the chess game
getPlayerUsernames() Fetch players usernames of the chess game
getPlayerData() Fetch players data of the chess game (top and bottom side)
getAverageElo() Fetch average elo of both players
getAll() Fetch all data (black and white player's elo, their average elo, moves and fens with timestamps, winner and result message and etc)

Installation

NPM:

npm install chesster

Yarn:

yarn add chesster

Package Sidebar

Install

npm i chesster

Weekly Downloads

2

Version

1.0.9

License

ISC

Unpacked Size

6.92 kB

Total Files

3

Last publish

Collaborators

  • nikakereselidze