v0.16.0 import PGN, delete games, two-layout web client
This commit is contained in:
1 parent
e1fa5242e3
commit
664cf9654e
34 files changed
+2007
-150
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user