lichess

package
v0.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) StartOpenGame

func (c *Client) StartOpenGame(ctx context.Context) (*OpenGameResponse, error)

type OpenGameResponse

type OpenGameResponse struct {
	Challenge struct {
		ID         string      `json:"id"`
		URL        string      `json:"url"`
		Status     string      `json:"status"`
		Challenger interface{} `json:"challenger"`
		DestUser   interface{} `json:"destUser"`
		Variant    struct {
			Key   string `json:"key"`
			Name  string `json:"name"`
			Short string `json:"short"`
		} `json:"variant"`
		Rated       bool   `json:"rated"`
		Speed       string `json:"speed"`
		TimeControl struct {
			Type string `json:"type"`
		} `json:"timeControl"`
		Color      string `json:"color"`
		FinalColor string `json:"finalColor"`
		Perf       struct {
			Icon string `json:"icon"`
			Name string `json:"name"`
		} `json:"perf"`
	} `json:"challenge"`
	SocketVersion int    `json:"socketVersion"`
	URLWhite      string `json:"urlWhite"`
	URLBlack      string `json:"urlBlack"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL