Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidMode = errors.New("This mode doesn't exist")
ErrInvalidMode The mode provided doesn't exist
View Source
var Prestige = map[string]int{}/* 180 elements not displayed */
Prestige File name to prestige map From OWAPI made by SunDwarf https://github.com/SunDwarf/OWAPI
View Source
var RegexStatName = regexp.MustCompile(`[^a-zA-Z0-9]`)
RegexStatName Create a better JSON-looking key name for stats
View Source
var TimeReplacer = strings.NewReplacer(" ", "", "minutes", "m", "minute", "m", "hours", "h", "hour", "h", "seconds", "s", "second", "s")
TimeReplacer Replace Career profile hero time with a valid ParseDuration string format
Functions ¶
This section is empty.
Types ¶
type All ¶
type All struct { *General QuickPlay *Stats `json:"quickplay,omitempty"` Competitive *Stats `json:"competitive,omitempty"` }
All stats together in one struct
type CareerProfile ¶
type CareerProfile struct {
// contains filtered or unexported fields
}
CareerProfile ...
func NewCareerProfile ¶
func NewCareerProfile(reader io.Reader) (*CareerProfile, error)
NewCareerProfile Get a CareerProfile struct from a Reader
func (*CareerProfile) NewGeneral ¶
func (c *CareerProfile) NewGeneral() *General
NewGeneral Get Data available even if account is private
func (*CareerProfile) NewStats ¶
func (c *CareerProfile) NewStats(mode Mode) *Stats
NewStats Stats specific to a mode
type General ¶
type General struct { Private bool `json:"private"` SR int `json:"rank,omitempty"` Prestige int `json:"prestige"` Level string `json:"level"` Portrait string `json:"portrait"` }
General Data available even if account is private
Source Files ¶
Click to show internal directories.
Click to hide internal directories.