leetcode

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotExist = errors.New("That user does not exist.")
)

Functions

func GetUserProfile

func GetUserProfile(userName string) (*models.UserProfile, error)

GetUserProfile 部分数据不全

Types

type AllNum added in v0.3.6

type AllNum struct {
	AllNum int `json:"allNum"`
}

type Data

type Data struct {
	Data   json.RawMessage `json:"data"`
	Errors []Errors        `json:"errors"`
}

type DataFollow added in v0.3.6

type DataFollow struct {
	Followers         AllNum `json:"followers"`
	FollowingEntities AllNum `json:"followingEntities"`
}

type Errors

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

type FollowInfo added in v0.3.6

type FollowInfo struct {
	Following int // 关注数量
	Followers int // 被关注数量
}

func GetFollow added in v0.3.6

func GetFollow(name string) (*FollowInfo, error)

GetFollow 被关注\关注

type LeetCodeUserProfile

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

type Locations

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

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 MatchedUserProfile struct {
	RealName   string `json:"realName"`
	UserAvatar string `json:"userAvatar"`
	Ranking    int    `json:"ranking"`
}

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 Submission added in v0.3.6

type Submission struct {
	Count       int    `json:"count"`
	Difficulty  string `json:"difficulty"`
	Submissions int    `json:"submissions"`
}

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 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"`
}

Jump to

Keyboard shortcuts

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