Forks | Stars |
---|---|
LichessNET is a C# library for interacting with the Lichess API. It allows you to manage games, challenges, and other Lichess features programmatically. It is a high level wrapper for all important Lichess API endpoints, and also implements a wrapper for the database of Lichess (database.lichess.org)
-
Download games from Lichess
-
Download games per user and tournaments
-
Retrieve game information
-
Accept and decline challenges
-
Challenge users to games
-
Get User information
-
Authorize with the Lichess Token
-
Too see where this trip is going, you may want to have a look to the Milestones: https://github.com/Rabergsel/LichessNET/milestones
To install LichessNET, you can clone the repository and build the project using your preferred IDE (e.g., JetBrains Rider, Visual Studio, ...), or download it from NuGet
Downloads | Version |
---|---|
To use LichessNET in your project, you will have to include the LichessNET.API
namespace:
Without Lichess Token
using LichessNET.API;
var client = new LichessAPIClient();
With Lichess Token
using LichessNET.API;
var client = new LichessApiClient(/* YOUR OPTIONAL LICHESS TOKEN */);
//If your token became invalid, the client will fall back to not using a token.
Access games from Lichess
By Game ID: var game = await client.GetGameAsync("cFcjVWzn");
Download from the monthly database:
var database = new DatabaseClient();
await database.DownloadMonthlyDatabase(2015, 1, ChessVariant.Atomic, "2015-01", false);
You can find the Game ID of a game in the URL of the game.
Challenges
bool accepted = await client.AcceptChallengeAsync("challengeId");
bool declined = await client.DeclineChallengeAsync("challengeId");
I welcome contributions of all kinds to LichessNET! Whether you're fixing bugs, adding features, improving documentation, or submitting issues, your input is highly appreciated. As you can see, there is still a lot of things to do. To contribute, simply fork the repository, make your changes, and submit a pull request. Thank you for helping make LichessNET better!
If you have any cool projects that were made with this package, please let me know via an issue, so I can display it here.
- Fetching account data
- Changing account settings
- Fetch user profiles
- Leaderboards
- Downloading games by ID
- Downloading games by User
- Live updating chess games
- Managing follows
- Get ongoing games
- Cloud evaluation access
- Challenge management
- Get puzzles
- Board events streaming
- Joining/Leaving a team
- Tablebases
- OAuth2 (?)
- Managing Team
- Queue for game
- Chatting
- Game management
- Bot endpoints
- Bulk pairings
- Arena tournaments
- Swiss tournaments
- Get current simuls
- Export studies
- Manage studies
- Send a private message
- Broadcasts
- External engine
- Opening explorer+
- Upload games to lichess
- Lichess TV