link

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneContest

func CloneContest(title string, id string, duration string)

func CreateContest

func CreateContest(title string, duration string, problems []string)

func GetContestCountdown added in v1.2.9

func GetContestCountdown(contestId string) int

func GetSample

func GetSample(contest string, index string) ([]string, []string)

func GetStatus

func GetStatus() map[string]bool

func Login

func Login()

func ManuallyLogin

func ManuallyLogin()

func QueryProbelmId

func QueryProbelmId(problem string) (string, error)

func QueryStatus

func QueryStatus(handle string) map[string]bool

func SaveStatus

func SaveStatus(handle string)

func SubmitCode

func SubmitCode(contest string, index string, code []byte, programTypeId string)

Types

type ContestInfo added in v1.2.9

type ContestInfo struct {
	Id                  int    `json:"id"`
	Name                string `json:"name"`
	Phase               string `json:"phase"`
	Frozen              bool   `json:"frozen"`
	DurationSeconds     int    `json:"durationSeconds"`
	StartTimeSeconds    int    `json:"startTimeSeconds"`
	RelativeTimeSeconds int    `json:"relativeTimeSeconds"`
}

type ContestStandingInterface

type ContestStandingInterface struct {
	Status  string                `json:"status"`
	Result  ContestStandingResult `json:"result"`
	Comment string                `json:"comment"`
}

type ContestStandingResult

type ContestStandingResult struct {
	Problems []Problem   `json:"problems"`
	Contest  ContestInfo `json:"contest"`
}

func GetContestInfo added in v1.2.9

func GetContestInfo(contestId string) ContestStandingResult

type Problem

type Problem struct {
	ContestId int    `json:"contestId"`
	Index     string `json:"index"`
}

type ProblemInfo

type ProblemInfo struct {
	EnglishName   string   `json:"englishName"`
	Id            string   `json:"id"`
	LocalizedName string   `json:"localizedName"`
	Rating        int      `json:"rating"`
	RussianName   string   `json:"russianName"`
	SolutionsUrl  string   `json:"solutionsUrl"`
	SolvedCount   int      `json:"solvedCount"`
	StatementUrl  string   `json:"statementUrl"`
	Tags          []string `json:"tags"`
}

type ProblemInfos

type ProblemInfos struct {
	Problems []ProblemInfo `json:"problems"`
	Success  string        `json:"success"`
}

type ProblemJson

type ProblemJson struct {
	Id    string `json:"id"`
	Index string `json:"index"`
}

type Status

type Status struct {
	Problem Problem `json:"problem"`
	// Id                  int     `json:"id"`
	// ContestId           int     `json:"contestId"`
	// CreationTimeSeconds int     `json:"creationTimeSeconds"`
	// RelativeTimeSeconds int     `json:"relativeTimeSeconds"`
	// Author              any     `json:"author"`
	// ProgrammingLanguage string  `json:"programmingLanguage"`
	Verdict string `json:"verdict"`
}

type UsersStatusApi

type UsersStatusApi struct {
	Status string   `json:"status"`
	Result []Status `json:"result"`
}

Jump to

Keyboard shortcuts

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