com

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAnswerHigh    = errors.New("answer is too high")
	ErrAnswerLow     = errors.New("answer is too low")
	ErrAlreadySolved = errors.New("puzzle already solved")
)
View Source
var ErrUnauthorized = errors.New("unauthorized")

Functions

func GetExampleInput

func GetExampleInput(client *Client, year, day int) (string, error)

func GetPuzzleInput

func GetPuzzleInput(client *Client, year, day int) (string, error)

func Ping

func Ping(client *Client) (string, error)

func Submit

func Submit(client *Client, year, day, part int, answer string) error

Types

type Client

type Client struct {
	*http.Client
	Address string
	Session string
}

func NewClient

func NewClient(session string) *Client

func (*Client) Get

func (c *Client) Get(path string) (string, error)

func (*Client) Post

func (c *Client) Post(path, body string) (string, error)

Jump to

Keyboard shortcuts

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