atcoder

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseURL     = "https://atcoder.jp"
	LoginURL    = "https://atcoder.jp/login"
	ContestsURL = "https://atcoder.jp/contests"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*http.Client
	Username string
}

func NewClient

func NewClient() (*Client, error)

func (*Client) FetchContest

func (cli *Client) FetchContest(id string) (*Contest, error)

func (*Client) FetchTask

func (cli *Client) FetchTask(id string, u string) (*Task, error)

func (*Client) LoadToken

func (cli *Client) LoadToken(token *Token)

func (*Client) Login

func (cli *Client) Login(username string, password string) error

func (*Client) SaveToken

func (cli *Client) SaveToken() *Token

type Contest

type Contest struct {
	ID    string
	URL   string
	Tasks []*Task
}

type Task

type Task struct {
	ID        string
	URL       string
	Testcases []*Testcase
}

type Testcase

type Testcase struct {
	Input  string
	Output string
}

type Token

type Token struct {
	Username string
	Cookies  []*http.Cookie
}

Jump to

Keyboard shortcuts

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