Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PlatformXBL is platform : XBOX PlatformXBL = "xbl" // PlatformPSN is the platform : Playstation Network PlatformPSN = "psn" // PlatformPC is the platform : PC PlatformPC = "pc" PlatformNS = "nintendo-switch" )
Variables ¶
View Source
var ( // ErrPlayerNotFound is thrown when a player doesn't exist ErrPlayerNotFound = errors.New("Player not found") // ErrInvalidPlatform is thrown when the passed params are incorrect ErrInvalidPlatform = errors.New("Invalid platform") )
Functions ¶
This section is empty.
Types ¶
type Platform ¶
type Platform struct { Platform string `json:"platform"` ID int `json:"id"` Name string `json:"name"` URLName string `json:"urlName"` PlayerLevel int `json:"playerLevel"` Portrait string `json:"portrait"` IsPublic bool `json:"isPublic"` }
Platform represents a response from the search-by-name api request
type PlayerStats ¶
type PlayerStats struct { Icon string `json:"icon"` Name string `json:"name"` Level int `json:"level"` LevelIcon string `json:"levelIcon"` Endorsement int `json:"endorsement"` EndorsementIcon string `json:"endorsementIcon"` Prestige int `json:"prestige"` PrestigeIcon string `json:"prestigeIcon"` Ratings []Rating `json:"ratings"` GamesWon int `json:"gamesWon"` QuickPlayStats statsCollection `json:"quickPlayStats"` CompetitiveStats statsCollection `json:"competitiveStats"` Private bool `json:"private"` }
PlayerStats holds all stats on a specified Overwatch player
func ConsoleStats ¶
func ConsoleStats(platform, tag string) (*PlayerStats, error)
ConsoleStats retrieves player stats for Console
func Stats ¶
func Stats(platform, tag string) (*PlayerStats, error)
Stats retrieves player stats Universal method if you don't need to differentiate it
Click to show internal directories.
Click to hide internal directories.