leetcode

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	UserProfilePublicProfile UserProfilePublicProfile `json:"userProfilePublicProfile"`
}

type Errors

type Errors struct {
	Message   string      `json:"message"`
	Locations []Locations `json:"locations"`
}

type LeetCodeErrors

type LeetCodeErrors struct {
	Errors []Errors `json:"errors"`
}

type LeetCodeUserProfile

type LeetCodeUserProfile struct {
	Data Data `json:"data"`
}

type Locations

type Locations struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

type Profile

type Profile struct {
	UserSlug     string `json:"userSlug"`
	RealName     string `json:"realName"`
	UserAvatar   string `json:"userAvatar"`
	Location     string `json:"location"`
	ContestCount int    `json:"contestCount"`
	ASCIICode    string `json:"asciiCode"`
	Typename     string `json:"__typename"`
}

type SubmissionProgress

type SubmissionProgress struct {
	TotalSubmissions int    `json:"totalSubmissions"`
	WaSubmissions    int    `json:"waSubmissions"`
	AcSubmissions    int    `json:"acSubmissions"`
	ReSubmissions    int    `json:"reSubmissions"`
	OtherSubmissions int    `json:"otherSubmissions"`
	AcTotal          int    `json:"acTotal"`
	QuestionTotal    int    `json:"questionTotal"`
	Typename         string `json:"__typename"`
}

type UserProfile

type UserProfile struct {
	UserSlug         string `json:"userSlug"`         // URL path
	RealName         string `json:"realName"`         // 显示的名字
	UserAvatar       string `json:"userAvatar"`       // 头像
	SiteRanking      int    `json:"siteRanking"`      // 排名
	TotalSubmissions int    `json:"totalSubmissions"` // 共提交数
	AcSubmissions    int    `json:"acSubmissions"`    // 提交通过数
	WaSubmissions    int    `json:"waSubmissions"`    // 答案错误数【无用】
	ReSubmissions    int    `json:"reSubmissions"`    // 运行错误【无用】
	OtherSubmissions int    `json:"otherSubmissions"` // 其他错误【无用】
	AcTotal          int    `json:"acTotal"`          // 解决题目数量
	QuestionTotal    int    `json:"questionTotal"`    // 题目总数
}

UserProfile user info

func GetUserProfile

func GetUserProfile(userName string, isCN bool) (*UserProfile, error)

GetUserProfile get user profile by request leetcode

type UserProfilePublicProfile

type UserProfilePublicProfile struct {
	Username           string             `json:"username"`
	HaveFollowed       interface{}        `json:"haveFollowed"`
	SiteRanking        int                `json:"siteRanking"`
	Profile            Profile            `json:"profile"`
	SubmissionProgress SubmissionProgress `json:"submissionProgress"`
	Typename           string             `json:"__typename"`
}

Jump to

Keyboard shortcuts

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