stats

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UbiStatsURLTemplate = template.Must(template.New("statsURL").Parse(
	"https://prod.datadev.ubisoft.com/v1/users/{{urlquery .ProfileID}}/playerstats?spaceId=5172a557-50b5-4665-b7db-e3f2e8c5041d&view={{urlquery .View}}&aggregation={{urlquery .Aggregation}}&gameMode=all,ranked,unranked,casual&platformGroup=PC&teamRole=all,Attacker,Defender&seasons={{urlquery .Season}}",
))

Functions

This section is empty.

Types

type BombsiteGamemodeStats added in v0.7.0

type BombsiteGamemodeStats struct {
	All     []BombsiteTeamRoleStats
	Attack  []BombsiteTeamRoleStats
	Defence []BombsiteTeamRoleStats
}

type BombsiteStats added in v0.7.0

type BombsiteStats struct {
	// contains filtered or unexported fields
}

BombsiteStats provides stats aggregated by map.

func (*BombsiteStats) AggregationType added in v0.7.0

func (s *BombsiteStats) AggregationType() string

func (*BombsiteStats) UnmarshalJSON added in v0.7.0

func (s *BombsiteStats) UnmarshalJSON(data []byte) (err error)

func (*BombsiteStats) ViewType added in v0.7.0

func (s *BombsiteStats) ViewType() string

type BombsiteTeamRoleStats added in v0.7.0

type BombsiteTeamRoleStats struct {
	DetailedStats
	Name string
}

type DetailedStats added in v0.3.5

type DetailedStats struct {
	MinutesPlayed        int
	Assists              int
	Deaths               int
	KillsPerRound        float64
	MeleeKills           int
	TeamKills            int
	HeadshotPercentage   float64
	EntryDeaths          int
	EntryDeathTrades     int
	EntryKills           int
	EntryKillTrades      int
	Trades               int
	Revives              int
	RoundsSurvived       float64
	RoundsWithKill       float64
	RoundsWithMultikill  float64
	RoundsWithAce        float64
	RoundsWithClutch     float64
	RoundsWithKOST       float64
	RoundsWithEntryDeath float64
	RoundsWithEntryKill  float64
	DistancePerRound     float64
	DistanceTotal        float64
	TimeAlivePerMatch    float64
	TimeDeadPerMatch     float64
	// contains filtered or unexported fields
}

type GameMode

type GameMode string
const (
	ALL      GameMode = "all"
	CASUAL   GameMode = "casual"
	UNRANKED GameMode = "unranked"
	RANKED   GameMode = "ranked"
)

type MapStats

type MapStats struct {
	// contains filtered or unexported fields
}

MapStats provides stats aggregated by map.

func (*MapStats) AggregationType

func (s *MapStats) AggregationType() string

func (*MapStats) UnmarshalJSON

func (s *MapStats) UnmarshalJSON(data []byte) (err error)

func (*MapStats) ViewType added in v0.3.0

func (s *MapStats) ViewType() string

type MovingTrend added in v0.2.1

type MovingTrend struct {
	MovingPoints           int
	DistancePerRound       MovingTrendEntry
	HeadshotPercentage     MovingTrendEntry
	KillDeathRatio         MovingTrendEntry
	KillsPerRound          MovingTrendEntry
	RatioTimeAlivePerMatch MovingTrendEntry
	RoundsSurvived         MovingTrendEntry
	RoundsWithKill         MovingTrendEntry
	RoundsWithKOST         MovingTrendEntry
	RoundsWithMultikill    MovingTrendEntry
	RoundsWithOpeningDeath MovingTrendEntry
	RoundsWithOpeningKill  MovingTrendEntry
	WinLossRatio           MovingTrendEntry
}

type MovingTrendEntry added in v0.2.1

type MovingTrendEntry struct {
	Low     float64
	Average float64
	High    float64
	Actuals MovingTrendPoints
	Trend   MovingTrendPoints
}

type MovingTrendPoints added in v0.2.1

type MovingTrendPoints []float64

type MovingTrendStats

type MovingTrendStats struct {
	// contains filtered or unexported fields
}

MovingTrendStats provides stats without any specific aggregation, but with trends across a specific timeframe.

func (*MovingTrendStats) AggregationType

func (s *MovingTrendStats) AggregationType() string

func (*MovingTrendStats) UnmarshalJSON

func (s *MovingTrendStats) UnmarshalJSON(data []byte) error

func (*MovingTrendStats) ViewType added in v0.3.0

func (s *MovingTrendStats) ViewType() string

type MovingTrendTeamRoles added in v0.2.1

type MovingTrendTeamRoles struct {
	All     *MovingTrend
	Attack  *MovingTrend
	Defence *MovingTrend
}

type NamedMapStatDetails added in v0.6.0

type NamedMapStatDetails struct {
	DetailedStats
	Bombsites *BombsiteGamemodeStats
	// contains filtered or unexported fields
}

type NamedStats added in v0.4.1

type NamedStats struct {
	// contains filtered or unexported fields
}

type NamedTeamRoleStats added in v0.4.1

type NamedTeamRoleStats map[string]DetailedStats

type NamedTeamRoles added in v0.4.1

type NamedTeamRoles struct {
	All     NamedTeamRoleStats
	Attack  NamedTeamRoleStats
	Defence NamedTeamRoleStats
}

type OperatorStats

type OperatorStats struct {
	NamedStats
}

OperatorStats provides stats aggregated by operator.

func (*OperatorStats) AggregationType

func (s *OperatorStats) AggregationType() string

func (*OperatorStats) UnmarshalJSON

func (s *OperatorStats) UnmarshalJSON(data []byte) error

func (*OperatorStats) ViewType added in v0.3.0

func (s *OperatorStats) ViewType() string

type Provider

type Provider interface {
	json.Unmarshaler
	AggregationType() string // type of aggregation (e.g. "operators") to be used in URL query
	ViewType() string        // type of view (e.g. "summary") to be used in URL query
}

Provider should be implemented by statistics structs to enable it to be unmarshalled properly into the corresponding struct.

type SummarizedGameModeStats added in v0.2.1

type SummarizedGameModeStats struct {
	All     *DetailedStats
	Attack  *DetailedStats
	Defence *DetailedStats
	// contains filtered or unexported fields
}

type SummarizedStats

type SummarizedStats struct {
	// contains filtered or unexported fields
}

SummarizedStats provides stats without any specific aggregation.

func (*SummarizedStats) AggregationType

func (s *SummarizedStats) AggregationType() string

func (*SummarizedStats) UnmarshalJSON

func (s *SummarizedStats) UnmarshalJSON(data []byte) error

func (*SummarizedStats) ViewType added in v0.3.0

func (s *SummarizedStats) ViewType() string

type UbiStatsURLParams

type UbiStatsURLParams struct {
	ProfileID   string
	Aggregation string
	View        string
	Season      string
}

type WeaponNamedStats added in v0.2.1

type WeaponNamedStats struct {
	RoundsWithKill      float64
	RoundsWithMultikill float64
	HeadshotPercentage  float64
	// contains filtered or unexported fields
}

type WeaponNamesMap added in v0.7.0

type WeaponNamesMap map[string]WeaponNamedStats

type WeaponStats

type WeaponStats struct {
	// contains filtered or unexported fields
}

WeaponStats provides stats aggregated by weapon type and name.

func (*WeaponStats) AggregationType

func (s *WeaponStats) AggregationType() string

func (*WeaponStats) UnmarshalJSON

func (s *WeaponStats) UnmarshalJSON(data []byte) error

func (*WeaponStats) ViewType added in v0.3.0

func (s *WeaponStats) ViewType() string

type WeaponTeamRoles added in v0.2.1

type WeaponTeamRoles struct {
	All     *WeaponTypes
	Attack  *WeaponTypes
	Defence *WeaponTypes
}

type WeaponTypes added in v0.2.1

type WeaponTypes struct {
	PrimaryWeapons   WeaponTypesMap
	SecondaryWeapons WeaponTypesMap
}

type WeaponTypesMap added in v0.2.1

type WeaponTypesMap map[string]WeaponNamesMap

Jump to

Keyboard shortcuts

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