user

package
v0.0.0-...-ca68a2b Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlogEntries

func BlogEntries(cli *client.Client, handle string) ([]blog.BlogEntry, error)

func Friends

func Friends(cli *client.Client, onlyOnline bool) ([]string, error)

func Status

func Status(cli *client.Client, spar StatusPar) ([]problemset.Submission, error)

Types

type RatedListPar

type RatedListPar struct {
	ActiveOnly     bool  `json:"activeOnly"`     //. If true then only users, who participated in rated contest during the last month are returned. Otherwise, all users with at least one rated contest are returned.
	IncludeRetired bool  `json:"includeRetired"` //. If true, the method returns all rated users, otherwise the method returns only users, that were online at last month.
	ContestID      int64 `json:"contestId"`      //. Id of the contest. It is not the round number. It can be seen in contest URL. For example: /contest/566/status
}

func (RatedListPar) ParseToCFPar

func (sp RatedListPar) ParseToCFPar() (map[string][]string, error)

type RatingChange

type RatingChange struct {
	ContestId               int64  `json:"contestId"`               //.
	ContestName             string `json:"contestName"`             //. Localized.
	Handle                  string `json:"handle"`                  //. Codeforces user handle.
	Rank                    int64  `json:"rank"`                    //. Place of the user in the contest. This field contains user rank on the moment of rating update. If afterwards rank changes (e.g. someone get disqualified), this field will not be update and will contain old rank.
	RatingUpdateTimeSeconds int64  `json:"ratingUpdateTimeSeconds"` //. Time, when rating for the contest was update, in unix-format.
	OldRating               int64  `json:"oldRating"`               //. User rating before the contest.
	NewRating               int64  `json:"newRating"`               //. User rating after the contest.
}

func Rating

func Rating(cli *client.Client, handle string) ([]RatingChange, error)

type StatusPar

type StatusPar struct {
	Handle string `json:"handle"` // (Required) 	Codeforces user handle.
	From   int64  `json:"from"`   // 	1-based index of the first submission to return.
	Count  int64  `json:"count"`  // 	Number of returned submissions.
}

func (StatusPar) ParseToCFPar

func (sp StatusPar) ParseToCFPar() (map[string][]string, error)

type User

type User struct {
	Handle                  string `json:"handle"`                  // . Codeforces user handle.
	Email                   string `json:"email"`                   // . Shown only if user allowed to share his contact info.
	VkId                    string `json:"vkId"`                    // . User id for VK social network. Shown only if user allowed to share his contact info.
	OpenId                  string `json:"openId"`                  // . Shown only if user allowed to share his contact info.
	FirstName               string `json:"firstName"`               // . Localized. Can be absent.
	LastName                string `json:"lastName"`                // . Localized. Can be absent.
	Country                 string `json:"country"`                 // . Localized. Can be absent.
	City                    string `json:"city"`                    // . Localized. Can be absent.
	Organization            string `json:"organization"`            // . Localized. Can be absent.
	Contribution            int64  `json:"contribution"`            // . User contribution.
	Rank                    string `json:"rank"`                    // . Localized.
	Rating                  int64  `json:"rating"`                  // .
	MaxRank                 string `json:"maxRank"`                 // . Localized.
	MaxRating               int64  `json:"maxRating"`               // .
	LastOnlineTimeSeconds   int64  `json:"lastOnlineTimeSeconds"`   // . Time, when user was last seen online, in unix format.
	RegistrationTimeSeconds int64  `json:"registrationTimeSeconds"` // . Time, when user was registered, in unix format.
	FriendOfCount           int64  `json:"friendOfCount"`           // . Amount of users who have this user in friends.
	Avatar                  string `json:"avatar"`                  // . User's avatar URL.
	TitlePhoto              string `json:"titlePhoto"`              // . User's title photo URL.
}

func Info

func Info(cli *client.Client, handles []string, checkHistoricHandles bool) ([]User, error)

func RatedList

func RatedList(cli *client.Client, rlPar RatedListPar) ([]User, error)

Jump to

Keyboard shortcuts

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