tw

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidServerKey = errors.New("invalid server key")
	ErrInvalidServerURL = errors.New("invalid server URL")
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(opts ...ClientOption) *Client

func (*Client) GetBuildingInfo

func (c *Client) GetBuildingInfo(ctx context.Context, baseURL string) (domain.BuildingInfo, error)

func (*Client) GetEnnoblements

func (c *Client) GetEnnoblements(ctx context.Context, baseURL string, since time.Time) ([]domain.BaseEnnoblement, error)

func (*Client) GetOpenServers

func (c *Client) GetOpenServers(ctx context.Context, baseURL string) ([]domain.OpenServer, error)

func (*Client) GetPlayers

func (c *Client) GetPlayers(ctx context.Context, baseURL string) ([]domain.BasePlayer, error)

func (*Client) GetServerConfig

func (c *Client) GetServerConfig(ctx context.Context, baseURL string) (domain.ServerConfig, error)

func (*Client) GetTribes

func (c *Client) GetTribes(ctx context.Context, baseURL string) ([]domain.BaseTribe, error)

func (*Client) GetUnitInfo

func (c *Client) GetUnitInfo(ctx context.Context, baseURL string) (domain.UnitInfo, error)

func (*Client) GetVillages

func (c *Client) GetVillages(ctx context.Context, baseURL string) ([]domain.BaseVillage, error)

type ClientOption

type ClientOption func(c *Client)

func WithHTTPClient

func WithHTTPClient(hc *http.Client) ClientOption

func WithUserAgent

func WithUserAgent(ua string) ClientOption

type ParseError

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

func NewParseError

func NewParseError(err error, record []string, field string) ParseError

func (ParseError) Error

func (e ParseError) Error() string

func (ParseError) Field

func (e ParseError) Field() string

func (ParseError) Record

func (e ParseError) Record() []string

func (ParseError) Unwrap

func (e ParseError) Unwrap() error

Jump to

Keyboard shortcuts

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