Documentation
¶
Index ¶
- Variables
- func ArrayIntToStr(arr []int64) []string
- func Get(u string) ([]byte, error)
- type AbilityUpgrade
- type Conf
- type Dota2
- func (d *Dota2) GetAccountId(steamId int64) int64
- func (d *Dota2) GetAllTeamInfo() ([]Team, error)
- func (d *Dota2) GetFriendList(steamid int64) ([]Friend, error)
- func (d *Dota2) GetGameItems()
- func (d *Dota2) GetHeroes() ([]Hero, error)
- func (d *Dota2) GetLeagueListing()
- func (d *Dota2) GetLiveLeagueGames()
- func (d *Dota2) GetMatchDetails(matchId int64) (MatchDetails, error)
- func (d *Dota2) GetMatchHistory(param map[string]interface{}) (MatchHistory, error)
- func (d *Dota2) GetMatchHistoryBySequenceNum(param map[string]interface{}) (MatchHistory, error)
- func (d *Dota2) GetPlayerSummaries(steamIds []int64) ([]Player, error)
- func (d *Dota2) GetTeamInfoByTeamID(teamId int64) (Team, error)
- func (d *Dota2) GetTournamentPrizePool()
- func (d *Dota2) ResolveVanityUrl(vanityurl string) (int64, error)
- type Friend
- type FriendList
- type Hero
- type Heroes
- type Match
- type MatchDetails
- type MatchHistory
- type MatchResult
- type Player
- type PlayerSummaries
- type Team
- type TeamInfo
- type Vanity
- type VanityResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // convert 64-bit steamID to 32-bit steamID // STEAMID64 - 76561197960265728 = STEAMID32 ConvertInt int64 = 76561197960265728 )
Functions ¶
func ArrayIntToStr ¶
Types ¶
type AbilityUpgrade ¶
type Conf ¶
type Conf struct {
// contains filtered or unexported fields
}
func (*Conf) IntDefault ¶
type Dota2 ¶
type Dota2 struct {
// steam api url
SteamApi string
// steam api key: http://steamcommunity.com/dev/apikey
SteamApiKey string
//Steam User
SteamUser string
// api version
SteamApiVersion string
// dota2 name in api
Dota2Match string
Dota2Econ string
// api version
Dota2ApiVersion string
// convert 64-bit steamID to 32-bit steamID
// STEAMID64 - 76561197960265728 = STEAMID32
ConvertInt int64
// http request timeout
Timeout int
Dota2MatchUrl string
Dota2EconUrl string
SteamUserUrl string
}
func LoadConfig ¶
func (*Dota2) GetAccountId ¶
Convert 64-bit steamId to 32-bit steamId
func (*Dota2) GetFriendList ¶
Get friend list
func (*Dota2) GetGameItems ¶
func (d *Dota2) GetGameItems()
func (*Dota2) GetLeagueListing ¶
func (d *Dota2) GetLeagueListing()
func (*Dota2) GetLiveLeagueGames ¶
func (d *Dota2) GetLiveLeagueGames()
func (*Dota2) GetMatchDetails ¶
func (d *Dota2) GetMatchDetails(matchId int64) (MatchDetails, error)
Get match details
func (*Dota2) GetMatchHistory ¶
func (d *Dota2) GetMatchHistory(param map[string]interface{}) (MatchHistory, error)
Get match history
func (*Dota2) GetMatchHistoryBySequenceNum ¶
func (d *Dota2) GetMatchHistoryBySequenceNum(param map[string]interface{}) (MatchHistory, error)
Get match history by sequence num
func (*Dota2) GetPlayerSummaries ¶
Get player summaries
func (*Dota2) GetTeamInfoByTeamID ¶
Get team info by teamId
func (*Dota2) GetTournamentPrizePool ¶
func (d *Dota2) GetTournamentPrizePool()
type FriendList ¶
type FriendList struct {
Friendslist struct {
Friends []Friend `json:"friends"`
} `json:"friendslist"`
}
type Match ¶
type Match struct {
DireTeamID int64 `bson:"dire_team_id" json:"dire_team_id"`
LobbyType int `bson:"lobby_type" json:"lobby_type"`
MatchID int64 `bson:"match_id" json:"match_id"`
MatchSeqNum int64 `bson:"match_seq_num" json:"match_seq_num"`
Players []Player `bson:"players" json:"players"`
RadiantTeamID int64 `bson:"radiant_team_id" json:"radiant_team_id"`
StartTime int64 `bson:"start_time" json:"start_time"`
BarracksStatusDire int `bson:"barracks_status_dire" json:"barracks_status_dire"`
BarracksStatusRadiant int `bson:"barracks_status_radiant" json:"barracks_status_radiant"`
Cluster int `bson:"cluster" json:"cluster"`
DireCaptain int64 `bson:"dire_captain" json:"dire_captain"`
Duration int `bson:"duration" json:"duration"`
FirstBloodTime int `bson:"first_blood_time" json:"first_blood_time"`
GameMode int `bson:"game_mode" json:"game_mode"`
HumanPlayers int `bson:"human_players" json:"human_players"`
Leagueid int `bson:"leagueid" json:"leagueid"`
NegativeVotes int `bson:"negative_votes" json:"negative_votes"`
PositiveVotes int `bson:"positive_votes" json:"positive_votes"`
RadiantCaptain int64 `bson:"radiant_captain" json:"radiant_captain"`
RadiantWin bool `bson:"radiant_win" json:"radiant_win"`
TowerStatusDire int `bson:"tower_status_dire" json:"tower_status_dire"`
Tower_StatusRadiant int `bson:"tower_status_radiant" json:"tower_status_radiant"`
Error string `bson:"error" json:"error"`
}
type MatchDetails ¶
type MatchDetails struct {
Result Match `json:"result"`
}
type MatchHistory ¶
type MatchHistory struct {
Result MatchResult `json:"result"`
}
type MatchResult ¶
type Player ¶
type Player struct {
AccountID int64 `bson:"account_id" json:"account_id"`
HeroID int `bson:"hero_id" json:"hero_id"`
PlayerSlot int `bson:"player_slot" json:"player_slot"`
AbilityUpgrades []AbilityUpgrade `bson:"ability_upgrades" json:"ability_upgrades"`
Assists int `bson:"assists" json:"assists"`
Deaths int `bson:"deaths" json:"deaths"`
Denies int `bson:"denies" json:"denies"`
Gold int `bson:"gold" json:"gold"`
GoldPerMin int `bson:"gold_per_min" json:"gold_per_min"`
GoldSpent int `bson:"gold_spent" json:"gold_spent"`
HeroDamage int `bson:"hero_damage" json:"hero_damage"`
HeroHealing int `bson:"hero_healing" json:"hero_healing"`
Item0 int `bson:"item_0" json:"item_0"`
Item1 int `bson:"item_1" json:"item_1"`
Item2 int `bson:"item_2" json:"item_2"`
Item3 int `bson:"item_3" json:"item_3"`
Item4 int `bson:"item_4" json:"item_4"`
Item5 int `bson:"item_5" json:"item_5"`
Kills int `bson:"kills" json:"kills"`
LastHits int `bson:"last_hits" json:"last_hits"`
LeaverStatus int `bson:"leaver_status" json:"leaver_status"`
Level int `bson:"level" json:"level"`
TowerDamage int `bson:"tower_damage" json:"tower_damage"`
XpPerMin int `bson:"xp_per_min" json:"xp_per_min"`
Avatar string `bson:"avatar" json:"avatar"`
Avatarfull string `bson:"avatarfull" json:"avatarfull"`
Avatarmedium string `bson:"avatarmedium" json:"avatarmedium"`
Communityvisibilitystate int `bson:"communityvisibilitystate" json:"communityvisibilitystate"`
Lastlogoff int64 `bson:"lastlogoff" json:"lastlogoff"`
Personaname string `bson:"personaname" json:"personaname"`
Personastate int `bson:"personastate" json:"personastate"`
Personastateflags int `bson:"personastateflags" json:"personastateflags"`
Primaryclanid string `bson:"primaryclanid" json:"primaryclanid"`
Profilestate int `bson:"profilestate" json:"profilestate"`
Profileurl string `bson:"profileurl" json:"profileurl"`
Realname string `bson:"realname" json:"realname"`
Steamid string `bson:"steamid" json:"steamid"`
Timecreated int64 `bson:"timecreated" json:"timecreated"`
}
type PlayerSummaries ¶
type PlayerSummaries struct {
Response struct {
Players struct {
Player []Player `json:"player"`
} `json:"players"`
} `json:"response"`
}
type Team ¶
type Team struct {
AdminAccountID int64 `bson:"admin_account_id" json:"admin_account_id"`
CountryCode string `bson:"country_code" json:"country_code"`
GamesPlayedWithCurrentRoster int `bson:"games_played_with_current_roster" json:"games_played_with_current_roster"`
Logo int64 `json:"logo"`
LogoSponsor int `bson:"logo_sponsor" json:"logo_sponsor"`
Name string `json:"name"`
Player0AccountID int64 `bson:"player_0_account_id" json:"player_0_account_id"`
Player1AccountID int64 `bson:"player_1_account_id" json:"player_1_account_id"`
Player2AccountID int64 `bson:"player_2_account_id" json:"player_2_account_id"`
Player3AccountID int64 `bson:"player_3_account_id" json:"player_3_account_id"`
Player4AccountID int64 `bson:"player_4_account_id" json:"player_4_account_id"`
Player5AccountID int64 `bson:"player_5_account_id" json:"player_5_account_id"`
Rating string `json:"rating"`
Tag string `json:"tag"`
TeamID int64 `bson:"team_id" json:"team_id"`
TimeCreated int64 `bson:"time_created" json:"time_created"`
URL string `json:"url"`
}
type Vanity ¶
type Vanity struct {
Response VanityResp `json:"response"`
}
type VanityResp ¶
Click to show internal directories.
Click to hide internal directories.