Documentation
¶
Index ¶
- Variables
- type Best
- type ChessDaily
- type ChessRapid
- type ChessRating
- type Client
- func (c *Client) PlayerClubs(username string) ([]PlayerClub, error)
- func (c *Client) PlayerGameArchivePGN(username, year, month string) (string, error)
- func (c *Client) PlayerGameArchives(username string) ([]string, error)
- func (c *Client) PlayerGameMonthlyArchive(username, year, month string) ([]PlayerGame, error)
- func (c *Client) PlayerGames(username string) ([]PlayerGames, error)
- func (c *Client) PlayerGamesToMove(username string) ([]PlayerGamesToMove, error)
- func (c *Client) PlayerProfile(username string) (PlayerProfile, error)
- func (c *Client) PlayerStats(username string) (PlayerStats, error)
- func (c *Client) PlayerTournaments(username string) (PlayerTournamentsResponse, error)
- func (c *Client) TitledPlayers() ([]string, error)
- type Last
- type Player
- type PlayerClub
- type PlayerGame
- type PlayerGames
- type PlayerGamesToMove
- type PlayerProfile
- type PlayerStats
- type PlayerTournament
- type PlayerTournamentsResponse
- type PuzzleRushBest
- type Record
- type Tactics
- type Tournament
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ChessDaily ¶
type ChessDaily struct {
Last Last `json:"last"`
Best Best `json:"best"`
Record Record `json:"record"`
Tournament Tournament `json:"tournament"`
}
type ChessRapid ¶
type ChessRating ¶
type Client ¶
func (*Client) PlayerClubs ¶
func (c *Client) PlayerClubs(username string) ([]PlayerClub, error)
Returns an array of clubs a player is a member of, with joined date and last activity date.
func (*Client) PlayerGameArchivePGN ¶
Returns standard multi-game format PGN containing all games for a month for a player.
func (*Client) PlayerGameArchives ¶
Returns an array of monthly game archives available for a player.
func (*Client) PlayerGameMonthlyArchive ¶
func (c *Client) PlayerGameMonthlyArchive(username, year, month string) ([]PlayerGame, error)
Returns an array of live and daily chess games that a player has finished.
func (*Client) PlayerGames ¶
func (c *Client) PlayerGames(username string) ([]PlayerGames, error)
Returns an array of daily chess games that a player is currently playing.
func (*Client) PlayerGamesToMove ¶
func (c *Client) PlayerGamesToMove(username string) ([]PlayerGamesToMove, error)
Returns an array of daily chess games where it is a players turn to act.
func (*Client) PlayerProfile ¶
func (c *Client) PlayerProfile(username string) (PlayerProfile, error)
Returns details of an existing player.
func (*Client) PlayerStats ¶
func (c *Client) PlayerStats(username string) (PlayerStats, error)
Returns ratings, win/loss, and other stats about a players game play, tactics, lessons and puzzle rush score.
func (*Client) PlayerTournaments ¶
func (c *Client) PlayerTournaments(username string) (PlayerTournamentsResponse, error)
Returns an array of tournaments a player is registered, is attending or has attended in the past.
func (*Client) TitledPlayers ¶
Returns an array of titled-player usernames.
type PlayerClub ¶
type PlayerGame ¶
type PlayerGame struct {
URL string `json:"url"`
PGN string `json:"pgn"`
TimeControl string `json:"time_control"`
EndTime time.Duration `json:"end_time"`
Rated bool `json:"rated"`
TCN string `json:"tcn"`
UUID string `json:"uuid"`
InitialSetup string `json:"initial_setup"`
FEN string `json:"fen"`
StartTime time.Duration `json:"start_time"`
TimeClass string `json:"time_class"`
Rules string `json:"rules"`
White Player `json:"white"`
Black Player `json:"black"`
}
type PlayerGames ¶
type PlayerGames struct {
URL string `json:"url"`
MoveBy int64 `json:"move_by"`
PGN string `json:"pgn"`
TimeControl string `json:"time_control"`
LastActivity time.Duration `json:"last_activity"`
Rated bool `json:"rated"`
Turn string `json:"turn"`
FEN string `json:"fen"`
StartTime time.Duration `json:"start_time"`
TimeClass string `json:"time_class"`
Rules string `json:"rules"`
White string `json:"white"`
Black string `json:"black"`
}
type PlayerGamesToMove ¶
type PlayerProfile ¶
type PlayerProfile struct {
Avatar string `json:"avatar"`
PlayerId int64 `json:"player_id"`
ID string `json:"id"`
URL string `json:"url"`
Name string `json:"name"`
Username string `json:"username"`
Followers int64 `json:"followers"`
Country string `json:"country"`
Location string `json:"location"`
LastOnline time.Duration `json:"last_online"`
Joined time.Duration `json:"joined"`
Status string `json:"status"`
IsStreamer bool `json:"is_streamer"`
Verified bool `json:"verified"`
}
type PlayerStats ¶
type PlayerStats struct {
ChessDaily ChessDaily `json:"chess_daily"`
Chess960Daily ChessDaily `json:"chess960_daily"`
ChessRapid ChessRapid `json:"chess_rapid"`
ChessBullet ChessRapid `json:"chess_bullet"`
ChessBlitz ChessRapid `json:"chess_blitz"`
Fide int64 `json:"fide"`
Tactics Tactics `json:"tactics"`
PuzzleRush PuzzleRushBest `json:"puzzle_rush"`
}
type PlayerTournament ¶
type PlayerTournamentsResponse ¶
type PlayerTournamentsResponse struct {
Finished []PlayerTournament `json:"finished"`
InProgress []PlayerTournament `json:"in_progress"`
Registered []PlayerTournament `json:"registered"`
}
type PuzzleRushBest ¶
type Tactics ¶
type Tactics struct {
Highest ChessRating `json:"highest"`
Lowest ChessRating `json:"lowest"`
}