Documentation
¶
Index ¶
- func RemoveCredentials()
- func SetCredentials(session string, csrfToken string)
- type AcSubmission
- type Author
- type AuthorProfile
- type Badge
- type CoinReward
- type Comment
- type Company
- type Contest
- type ContestMeta
- type ContestProblemInfo
- type ContestRanking
- type DifficultyCount
- type DifficultyPercentage
- type Discussion
- type DiscussionList
- type DiscussionListItem
- type DiscussionNode
- type IQuery
- type IUtil
- type ParticipantDetails
- type Post
- type Problem
- type ProblemContent
- type ProblemList
- type ProblemsByTopic
- type SubmissionInContest
- type TagCount
- type TagProblemCounts
- type TopicTag
- type UserCalendar
- type UserContestRanking
- type UserContestRankingDetails
- type UserContestRankingHistory
- type UserProfile
- type UserPublicProfile
- type UserSolveCountByDifficulty
- type UserSolveCountByDifficultyDetails
- type Util
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveCredentials ¶
func RemoveCredentials()
func SetCredentials ¶
Types ¶
type AcSubmission ¶
type AcSubmission struct { Id string `json:"id"` Timestamp string `json:"timestamp"` Title string `json:"title"` TitleSlug string `json:"titleSlug"` }
func GetUserRecentAcSubmissions ¶
func GetUserRecentAcSubmissions(username string, pageSize int) ([]AcSubmission, error)
type Author ¶
type Author struct { ActiveBadge Badge `json:"activeBadge,omitempty"` IsActive bool `json:"isActive,omitempty"` IsDiscussAdmin bool `json:"isDiscussAdmin,omitempty"` IsDiscussStaff bool `json:"isDiscussStaff,omitempty"` NameColor string `json:"nameColor,omitempty"` Profile AuthorProfile `json:"profile,omitempty"` Username string `json:"username"` }
type AuthorProfile ¶
type CoinReward ¶
type Comment ¶
type Comment struct { Id int64 `json:"id,omitempty"` NumChildren int `json:"numChildren,omitempty"` Pinned bool `json:"pinned,omitempty"` Post Post `json:"post"` }
func GetCommentReplies ¶
type Contest ¶
type Contest struct { Company Company `json:"company"` ContainsPremium bool `json:"containsPremium"` ContestMeta ContestMeta `json:"contest"` Questions []ContestProblemInfo `json:"questions"` Registered bool `json:"registered"` }
func GetContestInfo ¶
type ContestMeta ¶
type ContestMeta struct { Description string `json:"description"` DiscussTopicId int64 `json:"discuss_topic_id"` Duration int64 `json:"duration"` Id int64 `json:"id"` IsPrivate bool `json:"is_private"` IsVirtual bool `json:"is_virtual"` OriginStartTime int64 `json:"origin_start_time"` StartTime int64 `json:"start_time"` Title string `json:"title"` TitleSlug string `json:"title_slug"` }
type ContestProblemInfo ¶
type ContestRanking ¶
type ContestRanking struct { IsPast bool `json:"is_past"` Questions []ContestProblemInfo `json:"questions"` Ranks []ParticipantDetails `json:"total_rank"` Submissions []map[string]SubmissionInContest `json:"submissions"` Time float64 `json:"time"` TotalUser int `json:"user_num"` TotalPage int }
func GetContestRanking ¶
func GetContestRanking(contestSlug string, page int) (ContestRanking, error)
type DifficultyCount ¶
type DifficultyPercentage ¶
type Discussion ¶
type Discussion struct { HideFromTrending bool `json:"hideFromTrending"` Id int64 `json:"id"` Pinned bool `json:"pinned"` Post Post `json:"post"` Subscribed bool `json:"subscribed"` Tags []string `json:"tags"` Title string `json:"title"` TopLevelCommentCount int `json:"topLevelCommentCount"` ViewCount int `json:"viewCount"` }
func GetDiscussion ¶
func GetDiscussion(topicId int64) (Discussion, error)
type DiscussionList ¶
type DiscussionList struct { Data []DiscussionListItem `json:"edges"` TotalNum int `json:"totalNum"` }
func GetDiscussions ¶
type DiscussionListItem ¶
type DiscussionListItem struct { Cursor string `json:"cursor"` Node DiscussionNode `json:"node"` }
type DiscussionNode ¶
type DiscussionNode struct { CommentCount int `json:"commentCount"` Id string `json:"id"` LastComment Comment `json:"lastComment"` Pinned bool `json:"pinned"` Post Post `json:"post"` Tags []struct { Name string `json:"name"` Slug string `json:"slug"` } `json:"tags"` Title string `json:"title"` ViewCount int `json:"viewCount"` }
type ParticipantDetails ¶
type ParticipantDetails struct { ContestId int `json:"contest_id"` CountryCode string `json:"country_code"` CountryName string `json:"country_name"` DataRegion string `json:"data_region"` FinishTime int64 `json:"finish_time"` GlobalRanking int `json:"global_ranking"` Rank int `json:"rank"` Score int `json:"score"` UserBadge struct { DisplayName string `json:"display_name"` Icon string `json:"icon"` } `json:"user_badge"` UserSlug string `json:"user_slug"` Username string `json:"username"` UsernameColor string `json:"username_color"` }
type Post ¶
type Post struct { Id int `json:"id"` Author Author `json:"author,omitempty"` AuthorIsModerator bool `json:"authorIsModerator,omitempty"` CoinRewards []CoinReward `json:"coinRewards,omitempty"` Content string `json:"content,omitempty"` CreationDate int64 `json:"creationDate,omitempty"` IsHidden bool `json:"isHidden,omitempty"` IsOwnPost bool `json:"isOwnPost,omitempty"` Status string `json:"status,omitempty"` UpdationDate int64 `json:"updationDate,omitempty"` VoteCount int `json:"voteCount,omitempty"` VoteStatus int `json:"voteStatus,omitempty"` }
type Problem ¶
type Problem struct { AcRate float32 `json:"acRate"` Difficulty string `json:"difficulty"` FreqBar float32 `json:"freqBar"` FrontendQuestionId string `json:"frontendQuestionId"` IsFavor bool `json:"isFavor"` PaidOnly bool `json:"paidOnly"` Status string `json:"status"` QuestionId string `json:"questionId"` Title string `json:"title"` TitleSlug string `json:"titleSlug"` Stats string `json:"stats"` TopicTags []TopicTag `json:"topicTags"` }
type ProblemContent ¶
type ProblemContent struct {
Content string `json:"content"`
}
func GetProblemContentByTitleSlug ¶
func GetProblemContentByTitleSlug(titleSlug string) (ProblemContent, error)
type ProblemList ¶
func GetAllProblems ¶
func GetAllProblems(offset int, pageSize int) (ProblemList, error)
func GetTopInterviewProblems ¶
func GetTopInterviewProblems(offset int, pageSize int) (ProblemList, error)
type ProblemsByTopic ¶
type ProblemsByTopic struct { TopicName string `json:"name"` TopicSlug string `json:"slug"` Questions []Problem `json:"questions"` }
func GetProblemsByTopic ¶
func GetProblemsByTopic(topicSlug string) (ProblemsByTopic, error)
type SubmissionInContest ¶
type TagProblemCounts ¶
type TagProblemCounts struct { Advanced []TagCount `json:"advanced"` Fundamental []TagCount `json:"fundamental"` Intermediate []TagCount `json:"intermediate"` }
func GetUserSolveCountByProblemTag ¶
func GetUserSolveCountByProblemTag(username string) (TagProblemCounts, error)
type UserCalendar ¶
type UserCalendar struct { ActiveYears []int `json:"activeYears"` DccBadges []struct { Badge struct { Icon string `json:"icon"` Name string `json:"name"` } `json:"badge"` Timestamp int64 `json:"timestamp"` } `json:"dccBadges"` Streak int `json:"streak"` SubmissionCalendar string `json:"submissionCalendar"` TotalActiveDays int `json:"totalActiveDays"` }
func GetUserProfileCalendar ¶
func GetUserProfileCalendar(username string) (UserCalendar, error)
type UserContestRanking ¶
type UserContestRanking struct { AttendedContestsCount int `json:"attendedContestsCount"` Badge struct { Name string `json:"name"` } `json:"badge"` GlobalRanking int `json:"globalRanking"` Rating float32 `json:"rating"` TopPercentage float32 `json:"topPercentage"` TotalParticipants int `json:"totalParticipants"` }
type UserContestRankingDetails ¶
type UserContestRankingDetails struct { UserContestRanking UserContestRanking `json:"userContestRanking"` UserContestRankingHistory []UserContestRankingHistory `json:"userContestRankingHistory"` }
func GetUserContestRankingHistory ¶
func GetUserContestRankingHistory(username string) (UserContestRankingDetails, error)
type UserContestRankingHistory ¶
type UserContestRankingHistory struct { Attended bool `json:"attended"` Contest struct { Title string `json:"title"` StartTime int64 `json:"startTime"` } `json:"contest"` FinishTimeInSeconds int `json:"finishTimeInSeconds"` ProblemsSolved int `json:"problemsSolved"` Ranking int `json:"ranking"` Rating float32 `json:"rating"` TotalProblems int `json:"totalProblems"` TrendDirection string `json:"trendDirection"` }
type UserProfile ¶
type UserProfile struct { AboutMe string `json:"aboutMe"` CategoryDiscussCount int `json:"categoryDiscussCount"` CategoryDiscussCountDiff int `json:"categoryDiscussCountDiff"` Company string `json:"company"` CountryName string `json:"countryName"` JobTitle string `json:"jobTitle"` PostViewCount int `json:"postViewCount"` PostViewCountDiff int `json:"postViewCountDiff"` Ranking int `json:"ranking"` RealName string `json:"realName"` Reputation int `json:"reputation"` ReputationDiff int `json:"reputationDiff"` School string `json:"school"` SkillTags []string `json:"skillTags"` SolutionCount int `json:"solutionCount"` SolutionCountDiff int `json:"solutionCountDiff"` UserAvatar string `json:"userAvatar"` Websites []string `json:"websites"` }
type UserPublicProfile ¶
type UserPublicProfile struct { ContestBadge struct { Expired bool `json:"expired"` HoverText string `json:"hoverText"` Icon string `json:"icon"` Name string `json:"name"` } `json:"contestBadge"` GithubUrl string `json:"githubUrl"` LinkedinUrl string `json:"linkedinUrl"` Profile UserProfile `json:"profile"` TwitterUrl string `json:"twitterUrl"` Username string `json:"username"` }
func GetUserPublicProfile ¶
func GetUserPublicProfile(username string) (UserPublicProfile, error)
type UserSolveCountByDifficulty ¶
type UserSolveCountByDifficulty struct { BeatsStats []DifficultyPercentage `json:"problemsSolvedBeatsStats"` SubmitStatsGlobal struct { AcSubmissionNum []DifficultyCount `json:"acSubmissionNum"` } `json:"submitStatsGlobal"` }
type UserSolveCountByDifficultyDetails ¶
type UserSolveCountByDifficultyDetails struct { AllQuestionsCount []DifficultyCount `json:"allQuestionsCount"` SolveCount UserSolveCountByDifficulty `json:"matchedUser"` }
func GetUserSolveCountByDifficulty ¶
func GetUserSolveCountByDifficulty(username string) (UserSolveCountByDifficultyDetails, error)
Click to show internal directories.
Click to hide internal directories.