client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package client wraps the API specs into a client

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
}

Client wraps the generated OpenAPI client

func New

func New(cfg *config.Config, logger *log.Logger) (*Client, error)

New creates a new client instance

func (*Client) Assignments

func (c *Client) Assignments(ctx context.Context) (*[]api.Assignment2, error)

Assignments returns all currently active assignments

func (*Client) Campaigns

func (c *Client) Campaigns(ctx context.Context) (*[]api.Campaign2, error)

Campaigns returns all currently active campaigns

func (*Client) Connect added in v0.0.3

func (c *Client) Connect(ctx context.Context) error

Connect implements main.ConnectWaiter.

func (*Client) Dispatches

func (c *Client) Dispatches(ctx context.Context) (*[]api.Dispatch, error)

Dispatches returns all currently active dispatches

func (*Client) Planets

func (c *Client) Planets(ctx context.Context) (*[]api.Planet, error)

Planets returns all planets in the current war

func (*Client) War

func (c *Client) War(ctx context.Context) (*api.War, error)

War returns the current war

func (*Client) WarID

func (c *Client) WarID(ctx context.Context) (*api.WarId, error)

WarID returns the ID of the current war

Jump to

Keyboard shortcuts

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