Documentation
¶
Index ¶
- Variables
- func GetUserAgent() string
- func Send(client *http.Client, uri string, method string, query string, ptr interface{}) error
- type AllNum
- type Data
- type DataFollow
- type Errors
- type FollowInfo
- type LeetCodeUserProfile
- type Locations
- type MatchedUser
- type MatchedUserProfile
- type Profile
- type Submission
- type SubmissionProgress
- type SubmitStats
- type UserProfile
- type UserProfileData
- type UserProfilePublicProfile
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserNotExist = errors.New("That user does not exist.")
)
Functions ¶
Types ¶
type Data ¶
type Data struct {
Data json.RawMessage `json:"data"`
Errors []Errors `json:"errors"`
}
type DataFollow ¶ added in v0.3.6
type FollowInfo ¶ added in v0.3.6
type LeetCodeUserProfile ¶
type LeetCodeUserProfile struct {
UserProfilePublicProfile UserProfilePublicProfile `json:"userProfilePublicProfile"`
}
type MatchedUser ¶ added in v0.3.6
type MatchedUser struct {
Profile MatchedUserProfile `json:"profile"`
SubmitStats SubmitStats `json:"submitStats"`
}
type MatchedUserProfile ¶ added in v0.3.6
type Submission ¶ added in v0.3.6
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 SubmitStats ¶ added in v0.3.6
type SubmitStats struct {
AcSubmissionNum []Submission `json:"acSubmissionNum"`
TotalSubmissionNum []Submission `json:"totalSubmissionNum"`
}
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 UserProfileData ¶ added in v0.3.6
type UserProfileData struct {
MatchedUser MatchedUser `json:"matchedUser"`
AllQuestionsCount []Submission `json:"allQuestionsCount"`
}
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"`
}
Click to show internal directories.
Click to hide internal directories.