official

package
v0.0.0-...-c3f09fc Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKey

func APIKey() string

Types

type ScoreboardResponse

type ScoreboardResponse struct {
	IsFrozen      bool             `json:"is_frozen"`
	LastUpdatedAt string           `json:"last_updated_at"`
	Users         []ScoreboardUser `json:"users"`
}

func Scoreboard

func Scoreboard() (*ScoreboardResponse, error)

type ScoreboardResult

type ScoreboardResult struct {
	ProblemID       int    `json:"problem_id""`
	ProblemName     string `json:"problem_name"`
	LastSubmittedAt string `json:"last_submitted_at"`
	SubmissionCount int    `json:"submission_count"`
	MinCost         int    `json:"min_cost"`
}

type ScoreboardUser

type ScoreboardUser struct {
	UserID             int                `json:"user_id"`
	TeamName           string             `json:"team_name"`
	Results            []ScoreboardResult `json:"results"`
	TotalCost          int                `json:"total_cost"`
	SolvedProblemCount int                `json:"solved_problem_count"`
}

type SubmissionResponse

type SubmissionResponse struct {
	ID          int    `json:"id"`
	ProblemID   int    `json:"problem_id"`
	Score       int64  `json:"score"`
	Cost        int64  `json:"cost"`
	Status      string `json:"status"`
	SubmittedAt string `json:"submitted_at"`
	FileURL     string `json:"file_url"`
}

func Submission

func Submission(submissionID int) (*SubmissionResponse, error)

type SubmissionsEntry

type SubmissionsEntry struct {
	ID          int    `json:"id"`
	ProblemID   int    `json:"problem_id"`
	Score       int64  `json:"score"`
	Status      string `json:"status"`
	SubmittedAt string `json:"submitted_at"`
}

type SubmissionsResponse

type SubmissionsResponse struct {
	Submissions []SubmissionsEntry `json:"submissions"`
}

func Submissions

func Submissions() (*SubmissionsResponse, error)

type SubmitResponse

type SubmitResponse struct {
	SubmissionID int    `json:"submission_id,omitempty"`
	Message      string `json:"message,omitempty"`
}

func Submit

func Submit(problemID int, isl []byte) (*SubmitResponse, error)

Jump to

Keyboard shortcuts

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