Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Languages() ([]Language, error)
- func (c *Client) Login(username, password string) error
- func (c *Client) LoginWithNewSession(username, password, file string) error
- func (c *Client) LoginWithSession(file string) error
- func (c *Client) Logout() error
- func (c *Client) NewContestsPager() *ContestsPager
- func (c *Client) NewSubmissionsPager(contestID string) *SubmissionsPager
- func (c *Client) Submit(contestID, taskID string, languageID string, program io.Reader) (*Submission, error)
- func (c *Client) TaskInfo(contestID, taskID string) (*TaskInfo, error)
- func (c *Client) Tasks(contestID string) ([]*Task, error)
- type Contest
- type ContestsPager
- type IoStyle
- type Language
- type NeedAuthError
- type Submission
- type SubmissionsPager
- type Task
- type TaskInfo
- type TestCase
Constants ¶
This section is empty.
Variables ¶
var BASE_URL *base
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client for atcoder. available as http.Client
func (*Client) LoginWithNewSession ¶
LoginWithNewSession try to login to atcoder. File contents are overwritten.
func (*Client) LoginWithSession ¶
LoginWithSession try to login to atcoder. File contents are only read.
func (*Client) NewContestsPager ¶
func (c *Client) NewContestsPager() *ContestsPager
NewContestsPager creates new ContestsPager.
func (*Client) NewSubmissionsPager ¶
func (c *Client) NewSubmissionsPager(contestID string) *SubmissionsPager
NewSubmissionsPager creates new SubmissionsPager.
type Contest ¶
Contest
type Contest struct { Name string ID string // like "abc123" Kind string // like "Algorithm", "Heuristics"... State string // "permanent", "upcoming", "archive" }
type ContestsPager ¶
type ContestsPager struct {
// contains filtered or unexported fields
}
ContestsPager is pager for contests. Atcoder's website serves contests list with pagination.
func (*ContestsPager) Next ¶
func (pager *ContestsPager) Next() (contests []*Contest, ok bool)
Next returns next page's contests.
type IoStyle ¶
IoStyle represents input and output signature. Input and Output are machine readable sections. ~Desc is Description of ones.
type Language ¶
Language stand for "<option value={Language.Value} data-mime={Language.Datamime}>{Language.Text}</option>"
type NeedAuthError ¶
type NeedAuthError struct {
// contains filtered or unexported fields
}
func (*NeedAuthError) Error ¶
func (e *NeedAuthError) Error() string
type Submission ¶
type Submission = model.Submission
type SubmissionsPager ¶
type SubmissionsPager struct {
// contains filtered or unexported fields
}
SubmissionsPager is pager for submissions. Atcoder serves submissions list with pagination.
func (*SubmissionsPager) Next ¶
func (pager *SubmissionsPager) Next() (submissions []*Submission, ok bool)
parseSubmissions parses submission page. https://atcoder.jp/contests/practice/submissions/me