ranked

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UbiSkillURLTemplate = template.Must(template.New("skillURL").Parse(
	fmt.Sprintf(
		"https://public-ubiservices.ubi.com/v1/spaces/5172a557-50b5-4665-b7db-e3f2e8c5041d/sandboxes/OSBOR_PC_LNCH_A/r6karma/player_skill_records?board_ids=%s&season_ids={{.SeasonIDs}}&region_ids=%s&profile_ids={{.ProfileID}}",
		ubiBoardIDParam,
		ubiRegionIDParam,
	),
))

Functions

This section is empty.

Types

type SeasonStats

type SeasonStats struct {
	SeasonID             int
	Abandons             int
	Deaths               int
	Kills                int
	LastMMRChange        int
	LastResult           int
	LastSkillMeanChange  float64
	LastSkillStdevChange float64
	Losses               int
	MaxRank              int
	MaxMMR               int
	MMR                  int
	NextRankMMR          int
	PreviousRankMMR      int
	Rank                 int
	SkillMean            float64
	SkillStdev           float64
	TopRankPosition      int
	UpdateTime           time.Time
	Wins                 int
}

func NewSeasonStats

func NewSeasonStats(v ubiPlayerSkillJSON) SeasonStats

type SkillHistory

type SkillHistory []SeasonStats

SkillHistory contains a list of season stats. Should be ordered historically (i.e. most-recent season last).

func GetSkillHistory

func GetSkillHistory(v *UbiSkillRecordsJSON) (SkillHistory, error)

GetSkillHistory attempts to parse v into a SkillHistory instance.

type UbiSkillRecordsJSON

type UbiSkillRecordsJSON struct {
	SkillRecords []ubiSeasonSkillJSON `json:"seasons_player_skill_records"`
}

type UbiSkillURLParams

type UbiSkillURLParams struct {
	ProfileID      string
	NumPastSeasons uint8
}

UbiSkillURLParams contains parameters for UbiSkillURLTemplate. NumPastSeasons should be a positive integer indicating the number of seasons to retrieve, starting with the current one.

func (UbiSkillURLParams) SeasonIDs

func (p UbiSkillURLParams) SeasonIDs() string

SeasonIDs returns a query string used in UbiSkillURLTemplate and should not be called directly.

Jump to

Keyboard shortcuts

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