types

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Badge

type Badge struct {
	ID    string    `json:"id"`
	Label string    `json:"label"`
	TS    time.Time `json:"ts"`
}

type CacheInfo

type CacheInfo struct {
	At     CacheTime `json:"cached_at"`
	Until  CacheTime `json:"cached_until"`
	Status string    `json:"status"`
}

func (CacheInfo) TotalDuration

func (c CacheInfo) TotalDuration() time.Duration

type CacheTime

type CacheTime struct {
	time.Time
}

func (CacheTime) MarshalJSON

func (ct CacheTime) MarshalJSON() ([]byte, error)

func (*CacheTime) UnmarshalJSON

func (ct *CacheTime) UnmarshalJSON(data []byte) error

type DiscordInfo

type DiscordInfo struct {
	ID       string `json:"id"`
	Username string `json:"username"`
}

type FullTLStats

type FullTLStats struct {
	PartialTLStats

	NextRank       string `json:"next_rank"`
	PrevRank       string `json:"prev_rank"`
	PercentileRank string `json:"percentile_rank"`

	// The #1 ranked player has Standing 1. (not 0)
	Standing      int     `json:"standing"`
	StandingLocal int     `json:"standing_local"`
	NextAt        int     `json:"next_at"`
	PrevAt        int     `json:"prev_at"`
	Percentile    float64 `json:"percentile"`
}

type FullUser

type FullUser struct {
	LeagueUser
	League FullTLStats `json:"league"`

	TS        time.Time `json:"ts"`
	BotMaster string    `json:"botmaster"`
	Badges    []Badge   `json:"badges"`

	GamesPlayed int     `json:"gamesplayed"`
	GamesWon    int     `json:"gameswon"`
	GameTime    float64 `json:"gametime"`

	BadStanding   bool `json:"badstanding"`
	SupporterTier int  `json:"supporter_tier"`

	AvatarRevision int64 `json:"avatar_revision"`
	BannerRevision int64 `json:"banner_revision"`

	Bio         string `json:"bio"`
	FriendCount int    `json:"friend_count"`
	Connections struct {
		Discord DiscordInfo
	} `json:"connections"`
	Distinguishment struct {
		Type string
	} `json:"distinguishment"`
}

type GameRecord

type GameRecord struct {
	ID         string          `json:"_id"`
	Stream     string          `json:"stream"`
	ReplayID   string          `json:"replayid"`
	User       PartialUser     `json:"user"`
	TS         time.Time       `json:"ts"`
	IsMulti    bool            `json:"ismulti"`
	EndContext json.RawMessage `json:"endcontext"`
}

type Handling

type Handling struct {
	ARR      float64 `json:"arr"`
	DAS      float64 `json:"das"`
	DCD      float64 `json:"dcd"`
	SDF      int     `json:"sdf"`
	SafeLock bool    `json:"safelock"`
	Cancel   bool    `json:"cancel"`
}

Handling is the in game handling settings.

type LeagueEndCtx

type LeagueEndCtx struct {
	ID           string       `json:"id"`
	Username     string       `json:"username"`
	Handling     Handling     `json:"handling"`
	Active       bool         `json:"active"`
	Success      bool         `json:"success"`
	Inputs       int          `json:"inputs"`
	PiecesPlaced int          `json:"piecesplaced"`
	Wins         int          `json:"wins"`
	Points       LeaguePoints `json:"points"`
}

type LeaguePoints

type LeaguePoints struct {
	Primary   int     `json:"primary"`   // Wins
	Secondary float64 `json:"secondary"` // APM
	Tertiary  float64 `json:"tertiary"`  // PPS
	Extra     struct {
		VS float64 `json:"vs"`
	} `json:"extra"`
	SecondaryAvgTracking []float64 `json:"secondaryAvgTracking"` // APM of each round
	TertiaryAvgTracking  []float64 `json:"tertiaryAvgTracking"`  // PPS of each round
	ExtraAvgTracking     struct {
		AggregateStatsVSScore []float64 `json:"aggregatestats___vsscore"`
	} `json:"extraAvgTracking"`
}

type LeagueUser

type LeagueUser struct {
	PartialUser

	Role      string         `json:"role"`
	XP        float64        `json:"xp"`
	Country   string         `json:"country"`
	Supporter bool           `json:"supporter"`
	Verified  bool           `json:"verified"`
	League    PartialTLStats `json:"league"`
}

type PartialTLStats

type PartialTLStats struct {
	GamesPlayed int     `json:"gamesplayed"`
	GamesWon    int     `json:"gameswon"`
	Rating      float64 `json:"rating"`
	Rank        string  `json:"rank"`
	BestRank    string  `json:"bestrank"`
	Glicko      float64 `json:"glicko"`
	RD          float64 `json:"rd"`
	APM         float64 `json:"apm"`
	PPS         float64 `json:"pps"`
	VS          float64 `json:"vs"`
	Decaying    bool    `json:"decaying"`
}

type PartialUser

type PartialUser struct {
	ID       string `json:"_id"`
	Username string `json:"username"`
}

type Response

type Response struct {
	Success bool            `json:"success"`
	Error   json.RawMessage `json:"error"`
	Data    json.RawMessage `json:"data"`
	Cache   CacheInfo       `json:"cache"`
}

type VersusStats

type VersusStats struct {
	APM float64 `json:"apm"` // Attacks per minute
	PPS float64 `json:"pps"` // Pieces per second
	VS  float64 `json:"vs"`  // Versus score
}

VersusStats is the statistics for multiplayer games.

Jump to

Keyboard shortcuts

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