Skip to content

humanova/dchess-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dChess API

About

Chess service for Discord guilds.

Bot repository

Matches are played on lichess (account isn't necessary) and can be spectated.

  • Custom Global/Guild elo
  • Player/guild stats
  • Live board preview

Example Client

preview

API Endpoints

create_match : POST

creates an open match and returns lichess api response data
{
	"user_id" : 1234,
	"user_nickname" : "username",
	"opponent_id" : 1235,
	"opponent_nickname" : "test_user",
	"guild_id" : 1337
}

update_match : POST

updates player ids of an ongoing match
{
	"match_id" : "4fpT7YFN",
	"match_result": "unfinished", 
	"white_id":1234,
	"black_id":1235 
}

update_match_end : POST

if match has ended, update the match & elos (if player ids are known)
{
	"match_id" : "4fpT7YFN"
}

get_match_preview/match_id/move : GET

requests match data, renders the board and returns a png object
GET "example.com/dchess/api/get_match_preview/4fpT7YFN/11"
GET "example.com/dchess/api/get_match_preview/4fpT7YFN/last" 

get_match : POST

returns match data
{
	"match_id" : "4fpT7YFN"
}

get_player : POST

returns player data
{
	"player_id" : 1234
}

get_guild : POST

returns guild data which consists of guild player ids and elos
{
	"guild_id" : "544105274940850178"
}

Releases

No releases published

Packages

No packages published