v0.16.0 import PGN, delete games, two-layout web client
test / test (push) Canceled after 0s
test / e2e (push) Canceled after 0s

This commit is contained in:
lixen committed 2026-10-19 21:02:39 -04:00
1 parent e1fa5242e3
commit 664cf9654e
34 files changed
+2007 -150

No files matched your search

+15
View File
@@ -254,6 +254,21 @@ func (c *Client) GetMyGames(limit int, cursor string) (*GameListResponse, error)
return &resp, err
}
// RemoveMyGame takes a stored game off the caller's list: deleted when the
// caller alone holds it, released when another player keeps it.
func (c *Client) RemoveMyGame(gameID string) (*RemoveGameResponse, error) {
var resp RemoveGameResponse
err := c.doRequest("DELETE", "/api/users/me/games/"+gameID, nil, &resp)
return &resp, err
}
// ImportGame stores a PGN game for the caller.
func (c *Client) ImportGame(pgn string) (*ImportGameResponse, error) {
var resp ImportGameResponse
err := c.doRequest("POST", "/api/games/import", &ImportGameRequest{PGN: pgn}, &resp)
return &resp, err
}
func (c *Client) Register(username, password, email string) (*AuthResponse, error) {
req := &RegisterRequest{
Username: username,