Documentation ¶
Index ¶
- Variables
- func Get(rt models.RequestType, name string) (any, error)
- func GetSubCal(name string) (map[string]int, error)
- func GetUserContestRankingInfo(name string) (*models.UserContestRankingInfo, error)
- func GetUserProfile(name string) (*models.UserProfile, error)
- func GetUserQuestionProgress(name string) (*models.UserQuestionPrecess, error)
- func Send(client *http.Client, uri string, method string, query string, ptr interface{}) error
- func SendRaw(client *http.Client, uri string, method string, query string) ([]byte, error)
- type Data
- type Errors
- type LCNumQuestions
- type LCProfile
- type LCSubmissionProgress
- type LCUserContestRanking
- type LCUserProfilePublicProfile
- type LCUserProfileUserQuestionProgress
- type LeetCodeUserContestRankingInfo
- type LeetCodeUserProfile
- type LeetCodeUserQuestionProgress
- type Locations
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserNotExist = errors.New("That user does not exist.")
)
Functions ¶
func GetUserContestRankingInfo ¶
func GetUserContestRankingInfo(name string) (*models.UserContestRankingInfo, error)
func GetUserProfile ¶
func GetUserProfile(name string) (*models.UserProfile, error)
func GetUserQuestionProgress ¶
func GetUserQuestionProgress(name string) (*models.UserQuestionPrecess, error)
Types ¶
type Data ¶
type Data struct { Data json.RawMessage `json:"data"` Errors []Errors `json:"errors"` }
type LCNumQuestions ¶
type LCSubmissionProgress ¶
type LCSubmissionProgress 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 LCUserContestRanking ¶
type LCUserContestRanking struct { AttendedContestsCount int `json:"attendedContestsCount"` Rating float64 `json:"rating"` GlobalRanking int `json:"globalRanking"` LocalRanking int `json:"localRanking"` GlobalTotalParticipants int `json:"globalTotalParticipants"` LocalTotalParticipants int `json:"localTotalParticipants"` TopPercentage float64 `json:"topPercentage"` }
type LCUserProfilePublicProfile ¶
type LCUserProfilePublicProfile struct { Username string `json:"username"` HaveFollowed interface{} `json:"haveFollowed"` SiteRanking int `json:"siteRanking"` Profile LCProfile `json:"profile"` SubmissionProgress LCSubmissionProgress `json:"submissionProgress"` Typename string `json:"__typename"` }
type LCUserProfileUserQuestionProgress ¶
type LCUserProfileUserQuestionProgress struct { NumAcceptedQuestions []LCNumQuestions `json:"numAcceptedQuestions"` NumFailedQuestions []LCNumQuestions `json:"numFailedQuestions"` NumUntouchedQuestions []LCNumQuestions `json:"numUntouchedQuestions"` }
type LeetCodeUserContestRankingInfo ¶
type LeetCodeUserContestRankingInfo struct {
UserContestRanking *LCUserContestRanking `json:"userContestRanking"`
}
type LeetCodeUserProfile ¶
type LeetCodeUserProfile struct {
UserProfilePublicProfile LCUserProfilePublicProfile `json:"userProfilePublicProfile"`
}
type LeetCodeUserQuestionProgress ¶
type LeetCodeUserQuestionProgress struct {
UserProfileUserQuestionProgress LCUserProfileUserQuestionProgress `json:"userProfileUserQuestionProgress"`
}
Click to show internal directories.
Click to hide internal directories.