Documentation ¶
Index ¶
- Variables
- func GetPlayersInfo(steamids []string) (map[string]*PlayerInfo, error)
- func GetSteamGamesOwned(steamid string) (*map[string]string, error)
- func GetTF2Hours(steamid string) (int, error)
- func GetTF2HoursFromGamesOwned(res *map[string]string) int
- func GetTF2Stats(steamid string) (*map[string]string, error)
- func SetSteamApiKey(key string)
- type PersonaState
- type PlayerInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoGamesOwned = errors.New("No Steam game in player's profile.")
View Source
var PersonaStatesStr = [...]string{
"Offline",
"Online",
"Busy",
"Away",
"Snooze",
"Looking to Trade",
"Looking to Play",
}
Functions ¶
func GetPlayersInfo ¶
func GetPlayersInfo(steamids []string) (map[string]*PlayerInfo, error)
https://developer.valvesoftware.com/wiki/Steam_Web_API#GetPlayerSummaries_.28v0002.29
func GetTF2Hours ¶
func SetSteamApiKey ¶
func SetSteamApiKey(key string)
Types ¶
type PersonaState ¶
type PersonaState int
const ( PersonaStateOffline PersonaState = 0 PersonaStateOnline PersonaState = 1 PersonaStateBusy PersonaState = 2 PersonaStateAway PersonaState = 3 PersonaStateSnooze PersonaState = 4 PersonaStateLTTrade PersonaState = 5 PersonaStateLTPlay PersonaState = 6 )
func (*PersonaState) String ¶
func (ps *PersonaState) String() string
type PlayerInfo ¶
type PlayerInfo struct { // name Name string Personaname string Realname string // profile Profileurl string Personastate PersonaState Profilestate int Commentpermission string // steam Steamid string Communityvisibilitystate int Visibility string // time creaTed Timecreated int // location Loccountrycode string Locstatecode string Loccityid int // logoff Lastlogoff int // avatar Avatar string Avatarfull string Avatarmedium string }
func GetPlayerInfo ¶
func GetPlayerInfo(steamid string) (*PlayerInfo, error)
func (*PlayerInfo) GetLogoffTime ¶
func (p *PlayerInfo) GetLogoffTime() time.Time
get player "lastlogoff" as Time
func (*PlayerInfo) GetTimeCreated ¶
func (p *PlayerInfo) GetTimeCreated() time.Time
get player "timecreated" as Time
func (*PlayerInfo) Parse ¶
func (p *PlayerInfo) Parse(elem map[string]interface{}) error
parse player json
Click to show internal directories.
Click to hide internal directories.