dota2api

package module
v0.0.0-...-e074f6b Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2016 License: MIT Imports: 11 Imported by: 2

README

dota2-api

golang dota2-api

Usage

//TODO

Steam Api

ResolveVanityURL

Url

http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/

Arguments

key: Your Steam API Key

vanityurl: The user's vanity URL that you would like to retrieve a steam ID for, e.g. http://steamcommunity.com/id/gabelogannewell would use "gabelogannewell"

Result Data

success: The status of the request. 1 if successful, 42 if there was no match.

steamid (Optional): The 64 bit Steam ID the vanity URL resolves to. Not returned on resolution failures.

message (Optional): The message associated with the request status. Currently only used on resolution failures.

GetPlayerSummaries

Url

http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/

Arguments

key: Your Steam API Key

steamids

Result Data

A list of profile objects. Contained information varies depending on whether or not the user has their profile set to Friends only or Private.

steamid: The user's 64 bit ID

communityvisibilitystate: An integer that describes the access setting of the profile

1 - Private

2 - Friends only

3 - Friends of Friends

4 - Users Only

5 - Public

profilestate: If set to 1 the user has configured the profile.

personaname: User's display name.

lastlogoff: A unix timestamp of when the user was last online.

profileurl: The URL to the user's Steam Community profile.

avatar: A 32x32 image

avatarmedium: A 64x64 image

avatarfull: A 184x184 image

personastate: The user's status

0 - Offline (Also set when the profile is Private)

1 - Online

2 - Busy

3 - Away

4 - Snooze

5 - Looking to trade

6 - Looking to play

commentpermission (Optional): If present the profile allows public comments.

realname (Optional): The user's real name.

primaryclanid (Optional): The 64 bit ID of the user's primary group.

timecreated (Optional): A unix timestamp of the date the profile was created.

loccountrycode (Optional): ISO 3166 code of where the user is located.

locstatecode (Optional): Variable length code representing the state the user is located in.

loccityid (Optional): An integer ID internal to Steam representing the user's city.

gameid (Optional): If the user is in game this will be set to it's app ID as a string.

gameextrainfo (Optional): The title of the game.

gameserverip (Optional): The server URL given as an IP address and port number separated by a colon, this will not be present or set to "0.0.0.0:0" if none is available.

GetFriendList

Url

http://api.steampowered.com/ISteamUser/GetFriendList/v0001/

Arguments

key:

steamid: The 64 bit ID of the user to retrieve a list for.

relationship: Filter by a given role.

all - All roles

friend

Result Data

If the profile is not public or there are no available entries for the given relationship only an empty object will be returned.

friends - A list of objects for each list entry.

steamid: The 64 bit ID of the friend.

relationship: Role in relation to the given steamid

friend_since: A unix timestamp of when the friend was added to the list.

Dota2 Api

GetMatchHistory

Url

https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/v001/

Arguments

key: Your Steam API Key

hero_id (Optional) (uint32): A list of hero IDs can be found via the GetHeroes method.

game_mode (Optional) (uint32):

0 - None

1 - All Pick

2 - Captain's Mode

3 - Random Draft

4 - Single Draft

5 - All Random

6 - Intro

7 - Diretide

8 - Reverse Captain's Mode

9 - The Greeviling

10 - Tutorial

11 - Mid Only

12 - Least Played

13 - New Player Pool

14 - Compendium Matchmaking

16 - Captain's Draft

skill (Optional) (uint32): Skill bracket for the matches (Ignored if an account ID is specified).

0 - Any

1 - Normal

2 - High

3 - Very High

date_min (Optional) (uint32): Minimum date range for returned matches (unix timestamp, rounded to the nearest day).

date_max (Optional) (uint32): Maximum date range for returned matches (unix timestamp, rounded to the nearest day).

min_players (Optional) (string): Minimum amount of players in a match for the match to be returned.

account_id (Optional) (string): 32-bit account ID.

league_id (Optional) (string): Only return matches from this league. A list of league IDs can be found via the GetLeagueListing method.

start_at_match_id (Optional) (string): Start searching for matches equal to or older than this match ID.

matches_requested (Optional) (string): Amount of matches to include in results (default: 25).

tournament_games_only (Optional) (string): Whether to limit results to tournament matches

Result Data

status:

num_result:

total_results:

results_remaining:

matches

match_id:

match_seq_num:

start_time:

lobby_type:

radiant_team_id:

dire_team_id:

players:

account_id:

player_slot:

hero_id:

GetMatchDetails

Url

https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/v001/

Arguments

match_id: Match id

key: Your Steam API Key

Result Data

players: List of players in the match.

account_id: 32-bit account ID

player_slot:

hero_id: The hero's unique ID. A list of hero IDs can be found via the GetHeroes method.

item_0: ID of the top-left inventory item.

item_1: ID of the top-center inventory item.

item_2: ID of the top-right inventory item.

item_3: ID of the bottom-left inventory item.

item_4: ID of the bottom-center inventory item.

item_5: ID of the bottom-right inventory item.

kills: The amount of kills attributed to this player.

deaths: The amount of times this player died during the match.

assists: The amount of assists attributed to this player.

leaver_status: What the values here represent are not yet known.

gold: The amount of gold the player had remaining at the end of the match.

last_hits: The amount of last-hits the player got during the match.

denies: The amount of denies the player got during the match.

gold_per_min: The player's overall gold/minute.

xp_per_min: The player's overall experience/minute.

gold_spent: The amount of gold the player spent during the match.

hero_damage: The amount of damage the player dealt to heroes.

tower_damage: The amount of damage the player dealt to towers.

hero_healing: The amount of health the player had healed on heroes.

level: The player's level at match end.

ability_upgrades: A list detailing a player's ability upgrades.

ability: ID of the ability upgraded.

time: Time since match start that the ability was upgraded.

level: The level of the player at time of upgrading.

additional_units: Additional playable units owned by the player.

unitname: The name of the unit

item_0: ID of the top-left inventory item.

item_1: ID of the top-center inventory item.

item_2: ID of the top-right inventory item.

item_3: ID of the bottom-left inventory item.

item_4: ID of the bottom-center inventory item.

item_5: ID of the bottom-right inventory item.

season: The season the game was played in.

radiant_win: Dictates the winner of the match, true for radiant; false for dire.

duration: The length of the match, in seconds since the match began.

start_time: Unix timestamp of when the match began.

match_id: The matches unique ID.

match_seq_num: A 'sequence number', representing the order in which matches were recorded.

tower_status_radiant:

tower_status_dire:

barracks_status_radiant:

barracks_status_dire:

cluster: The server cluster the match was played upon. Used for downloading replays of matches.

first_blood_time: The time in seconds since the match began when first-blood occured.

lobby_type:

-1 - Invalid

0 - Public matchmaking

1 - Practise

2 - Tournament

3 - Tutorial

4 - Co-op with bots.

5 - Team match

6 - Solo Queue

human_players: The amount of human players within the match.

leagueid: The league that this match was a part of. A list of league IDs can be found via the GetLeagueListing method.

positive_votes: The number of thumbs-up the game has received by users.

negative_votes: The number of thumbs-down the game has received by users.

game_mode:

0 - None

1 - All Pick

2 - Captain's Mode

3 - Random Draft

4 - Single Draft

5 - All Random

6 - Intro

7 - Diretide

8 - Reverse Captain's Mode

9 - The Greeviling

10 - Tutorial

11 - Mid Only

12 - Least Played

13 - New Player Pool

14 - Compendium Matchmaking

picks_bans: A list of the picks and bans in the match, if the game mode is Captains Mode.

is_pick: Whether this entry is a pick (true) or a ban (false).

hero_id: The hero's unique ID. A list of hero IDs can be found via the GetHeroes method.

team: The team who chose the pick or ban; 0 for Radiant, 1 for Dire.

order: The order of which the picks and bans were selected; 0-19.

GetHeroes

Url

https://api.steampowered.com/IEconDOTA2_570/GetHeroes/v0001/

Arguments

language (Optional) (string): The language to provide hero names in.

itemizedonly (Optional) (bool): Return a list of itemized heroes only.

Result Data

heroes: List of heroes.

name: The tokenized string for the name of the hero.

id: ID of the hero.

localized_name: The localized name of the hero for use in name display.

count: Number of results.

GetLeagueListing

Url

https://api.steampowered.com/IDOTA2Match_570/GetLeagueListing/v0001/

Arguments

Result Data

GetLiveLeagueGames

Url

https://api.steampowered.com/IDOTA2Match_570/GetLiveLeagueGames/v0001/

Arguments

Result Data

GetTeamInfoByTeamID

Url

https://api.steampowered.com/IDOTA2Match_570/GetTeamInfoByTeamID/v001/

Arguments

Result Data

GetTournamentPrizePool

Url

https://api.steampowered.com/IEconDOTA2_570/GetTournamentPrizePool/v1/

Arguments

Result Data

GetGameItems

Url

https://api.steampowered.com/IEconDOTA2_570/GetGameItems/v0001/

Arguments

Result Data

Documentation

Index

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

func ArrayIntToStr(arr []int64) []string

func Get

func Get(u string) ([]byte, error)

http get

Types

type AbilityUpgrade

type AbilityUpgrade struct {
	Ability int `json:"ability" bson:"ability"`
	Level   int `json:"level" bson:"level"`
	Time    int `json:"time" bson:"time"`
}

type Conf

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

func (*Conf) Int

func (c *Conf) Int(section string, option string) (int, error)

func (*Conf) IntDefault

func (c *Conf) IntDefault(section string, option string, defaultValue int) int

func (*Conf) String

func (c *Conf) String(section string, option string) (string, error)

func (*Conf) StringDefault

func (c *Conf) StringDefault(section string, option string, defaultValue string) string

type Dire

type Dire struct {
	Score         int `json:"score" bson:"score"`
	TowerState    int `json:"tower_state" bson:"tower_state"`
	BarracksState int `json:"barracks_state" bson:"barracks_state"`
	Picks         []struct {
		HeroID int `json:"hero_id" bson:"heor_id"`
	} `json:"picks" bson:"picks"`
	Bans []struct {
		HeroID int `json:"hero_id" bson:"hero_id"`
	} `json:"bans" bson:"bans"`
	Players   []LivePlayer `json:"players" bson:"players"`
	Abilities []struct {
		AbilityID    int `json:"ability_id" bson:"ability_id"`
		AbilityLevel int `json:"ability_level" bson:"ability_level"`
	} `json:"abilities" bson:"abilities"`
}

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 LoadConfig(file string) (Dota2, error)

func (*Dota2) GetAccountId

func (d *Dota2) GetAccountId(steamId int64) int64

Convert 64-bit steamId to 32-bit steamId

func (*Dota2) GetFriendList

func (d *Dota2) GetFriendList(steamid int64) ([]Friend, error)

Get friend list

func (*Dota2) GetHeroes

func (d *Dota2) GetHeroes() ([]Hero, error)

Get all heroes

func (*Dota2) GetLeagueListing

func (d *Dota2) GetLeagueListing() (LeagueList, error)

func (*Dota2) GetLiveLeagueGames

func (d *Dota2) GetLiveLeagueGames() (LiveGames, error)

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

func (d *Dota2) GetPlayerSummaries(steamIds []int64) (PlayerSummaries, error)

Get player summaries

func (*Dota2) ResolveVanityUrl

func (d *Dota2) ResolveVanityUrl(vanityurl string) (int64, error)

Get steamId by username

type Friend

type Friend struct {
	SteamId      string `json:"steamid"`
	Relationship string `json:"relationship"`
	FriendSince  int64  `bson:"friend_since" json:"friend_since"`
}

type FriendList

type FriendList struct {
	Friendslist struct {
		Friends []Friend `json:"friends"`
	} `json:"friendslist"`
}

type Game

type Game struct {
	Players []struct {
		AccountID int    `json:"account_id" bson:"account_id"`
		Name      string `json:"name" bson:"name"`
		HeroID    int    `json:"hero_id" bson:"hero_id"`
		Team      int    `json:"team" bson:"team"`
	} `json:"players" bson:"players"`
	LobbyID           int64       `json:"lobby_id" bson:"lobby_id"`
	MatchID           int64       `json:"match_id" bson:"match_id"`
	Spectators        int         `json:"spectators" bson:"spectators"`
	SeriesID          int         `json:"series_id" bson:"series_id"`
	GameNumber        int         `json:"game_number" bson:"game_number"`
	LeagueID          int         `json:"league_id" bson:"league_id"`
	StreamDelayS      int         `json:"stream_delay_s" bson:"steam_delay_s"`
	RadiantSeriesWins int         `json:"radiant_series_wins" bson:"radiant_series_wins"`
	DireSeriesWins    int         `json:"dire_series_wins" bson:"dire_series_win"`
	SeriesType        int         `json:"series_type" bson:"series_type"`
	LeagueSeriesID    int         `json:"league_series_id" bson:"league_series_id"`
	LeagueGameID      int         `json:"league_game_id" bson:"league_game_id"`
	StageName         string      `json:"stage_name" bson:"stage_name"`
	LeagueTier        int         `json:"league_tier" bson:"league_tier"`
	Scoreboard        Scoreboard  `json:"scoreboard" bson:"scoreboard"`
	DireTeam          PlayersTeam `json:"dire_team,omitempty" bson:"dire_team"`
	RadiantTeam       PlayersTeam `json:"radiant_team,omitempty" bson:"radiant_team"`
}

type Hero

type Hero struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

type Heroes

type Heroes struct {
	Result struct {
		Count  int    `json:"count" bson:"count"`
		Heroes []Hero `json:"heroes" bson:"heroes"`
		Status int    `json:"status" bson:"status"`
	} `json:"result" bson:"result"`
}

type LeagueList

type LeagueList struct {
	Result struct {
		Leagues []struct {
			Name          string `json:"name" bson:"name"`
			Leagueid      int    `json:"leagueid" bson:"league_id"`
			Description   string `json:"description" bson:"description"`
			TournamentURL string `json:"tournament_url" bson:"tournament_url"`
			Itemdef       int    `json:"itemdef" bson:"item_def"`
		} `json:"leagues" bson:"leagues"`
	} `json:"result" bson:"result"`
}

type LiveGames

type LiveGames struct {
	Result struct {
		Games  []Game `json:"games" bson:"games"`
		Status int    `json:"status" bson:"status"`
	} `json:"result" bson:"result"`
}

type LivePlayer

type LivePlayer struct {
	PlayerSlot       int     `json:"player_slot" bson:"player_slot"`
	AccountID        int     `json:"account_id" bson:"account_id"`
	HeroID           int     `json:"hero_id" bson:"hero_id"`
	Kills            int     `json:"kills" bson:"kills"`
	Death            int     `json:"death" bson:"death"`
	Assists          int     `json:"assists" bson:"assists"`
	LastHits         int     `json:"last_hits" bson:"last_hits"`
	Denies           int     `json:"denies" bson:"denies"`
	Gold             int     `json:"gold" bson:"gold"`
	Level            int     `json:"level" bson:"level"`
	GoldPerMin       int     `json:"gold_per_min" bson:"gold_per_min"`
	XpPerMin         int     `json:"xp_per_min" bson:"xp_per_min"`
	UltimateState    int     `json:"ultimate_state" bson:"ultimate_state"`
	UltimateCooldown int     `json:"ultimate_cooldown" bson:"ultimate_cooldown"`
	Item0            int     `json:"item0" bson:"item0"`
	Item1            int     `json:"item1" bson:"item1"`
	Item2            int     `json:"item2" bson:"item2"`
	Item3            int     `json:"item3" bson:"item3"`
	Item4            int     `json:"item4" bson:"item4"`
	Item5            int     `json:"item5" bson:"item5"`
	RespawnTimer     int     `json:"respawn_timer" bson:"respawn"`
	PositionX        float64 `json:"position_x" bson:"position_x"`
	PositionY        float64 `json:"position_y" bson:"position_y"`
	NetWorth         int     `json:"net_worth" bson:"net_worth"`
}

type Match

type Match struct {
	Error                 string      `bson:"error" json:"error" bson:"error"`
	Players               []Player    `json:"players" bson:"players"`
	RadiantWin            bool        `json:"radiant_win" bson:"radiant_win"`
	Duration              int         `json:"duration" bson:"duration"`
	PreGameDuration       int         `json:"pre_game_duration" bson:"pre_game_duration"`
	StartTime             int         `json:"start_time" bson:"start_time"`
	MatchID               int64       `json:"match_id" bson:"match_id"`
	MatchSeqNum           int64       `json:"match_seq_num" bson:"match_seq_num"`
	TowerStatusRadiant    int         `json:"tower_status_radiant" bson:"tower_status_radiant"`
	TowerStatusDire       int         `json:"tower_status_dire" bson:"tower_status_dire"`
	BarracksStatusRadiant int         `json:"barracks_status_radiant" bson:"barracks_status_radiant"`
	BarracksStatusDire    int         `json:"barracks_status_dire" bson:"barracks_status_dire"`
	Cluster               int         `json:"cluster" bson:"cluster"`
	FirstBloodTime        int         `json:"first_blood_time" bson:"first_blood_time"`
	LobbyType             int         `json:"lobby_type" bson:"lobby_type"`
	HumanPlayers          int         `json:"human_players" bson:"human_players"`
	Leagueid              int         `json:"league_id" bson:"league_id"`
	PositiveVotes         int         `json:"positive_votes" bson:"positive_votes"`
	NegativeVotes         int         `json:"negative_votes" bson:"negative_votes"`
	GameMode              int         `json:"game_mode" bson:"game_mode"`
	Flags                 int         `json:"flags" bson:"flags"`
	Engine                int         `json:"engine" bson:"engine"`
	RadiantScore          int         `json:"radiant_score" bson:"radiant_score"`
	DireScore             int         `json:"dire_score" bson:"dire_score"`
	TournamentID          int         `json:"tournament_id" bson:"tournament_id"`
	TournamentRound       int         `json:"tournament_round" bson:"tournament_round"`
	RadiantTeamID         int         `json:"radiant_team_id" bson:"radiant_team_id"`
	RadiantName           string      `json:"radiant_name" bson:"radiant_name"`
	RadiantTeamComplete   int         `json:"radiant_team_complete" bson:"radiant_team_complete"`
	DireTeamID            int         `json:"dire_team_id" bson:"dire_team_id"`
	DireName              string      `json:"dire_name" bson:"dire_name"`
	DireTeamComplete      int         `json:"dire_team_complete" bson:"dire_team_complete"`
	RadiantCaptain        int         `json:"radiant_captain" bson:"radian_captain"`
	DireCaptain           int         `json:"dire_captain" bson:"dire_captain"`
	PicksBans             []PicksBans `json:"picks_bans" bson:"picks_bans"`
}

type MatchDetails

type MatchDetails struct {
	Result Match `json:"result"`
}

type MatchHistory

type MatchHistory struct {
	Result MatchHistoryResult `json:"result"`
}

type MatchHistoryResult

type MatchHistoryResult struct {
	Status           int            `json:"status" bson:"status"`
	LeagueId         int64          `json:"league_id"  bson:"league_id"`
	NumResults       int            `json:"num_results" bson:"num_results"`
	TotalResults     int            `json:"total_results" bson:"total_results"`
	ResultsRemaining int            `json:"results_remaining" bson:"results_remaining"`
	Matches          []MatchSummary `json:"matches" bson:"matches"`
}

type MatchSummary

type MatchSummary struct {
	SeriesID      int             `json:"series_id" bson:"series_id"`
	SeriesType    int             `json:"series_type" bson:"series_type"`
	MatchID       int64           `json:"match_id" bson:"match_id"`
	MatchSeqNum   int64           `json:"match_seq_num" bson:"match_seq_num"`
	StartTime     int             `json:"start_time" bson:"start_time"`
	LobbyType     int             `json:"lobby_type" bson:"loby_type"`
	RadiantTeamID int             `json:"radiant_team_id" bson:"radiant_team_id"`
	DireTeamID    int             `json:"dire_team_id" bson:"dire_team_id"`
	Players       []PlayerSummary `json:"players" bson:"players"`
}

type PicksBans

type PicksBans struct {
	IsPick bool `json:"is_pick" bson:"is_pick"`
	HeroID int  `json:"hero_id" bson:"hero_id"`
	Team   int  `json:"team" bson:"team"`
	Order  int  `json:"order" bson:"order"`
}

type Player

type Player struct {
	AccountID       int              `json:"account_id" bson:"account_id"`
	PlayerSlot      int              `json:"player_slot" bson:"player_slot"`
	HeroID          int              `json:"hero_id" bson:"hero_id"`
	Item0           int              `json:"item_0" bson:"item_0"`
	Item1           int              `json:"item_1" bson:"item_1"`
	Item2           int              `json:"item_2" bson:"item_2"`
	Item3           int              `json:"item_3" bson:"item_3"`
	Item4           int              `json:"item_4" bson:"item_4"`
	Item5           int              `json:"item_5" bson:"item_5"`
	Kills           int              `json:"kills" bson:"kills"`
	Deaths          int              `json:"deaths" bson:"deaths"`
	Assists         int              `json:"assists" bson:"assists"`
	LeaverStatus    int              `json:"leaver_status" bson:"lever_status"`
	LastHits        int              `json:"last_hits" bson:"last_hits"`
	Denies          int              `json:"denies" bson:"denies"`
	GoldPerMin      int              `json:"gold_per_min" bson:"gold_per_min"`
	XpPerMin        int              `json:"xp_per_min" bson:"xp_per_min"`
	Level           int              `json:"level" bson:"level"`
	Gold            int              `json:"gold" bson:"gold"`
	GoldSpent       int              `json:"gold_spent" bson:"gold_spent"`
	HeroDamage      int              `json:"hero_damage" bson:"hero_damage"`
	TowerDamage     int              `json:"tower_damage" bson:"tower_damage"`
	HeroHealing     int              `json:"hero_healing" bson:"hero_healing"`
	AbilityUpgrades []AbilityUpgrade `json:"ability_upgrades" bson:"ability_upgrades"`
}

type PlayerAccount

type PlayerAccount struct {
	Steamid                  string `json:"steamid"`
	Communityvisibilitystate int    `json:"communityvisibilitystate"`
	Profilestate             int    `json:"profilestate"`
	Personaname              string `json:"personaname"`
	Lastlogoff               int    `json:"lastlogoff"`
	Profileurl               string `json:"profileurl"`
	Avatar                   string `json:"avatar"`
	Avatarmedium             string `json:"avatarmedium"`
	Avatarfull               string `json:"avatarfull"`
	Personastate             int    `json:"personastate"`
	Realname                 string `json:"realname"`
	Primaryclanid            string `json:"primaryclanid"`
	Timecreated              int    `json:"timecreated"`
	Personastateflags        int    `json:"personastateflags"`
	Gameextrainfo            string `json:"gameextrainfo"`
	Gameid                   string `json:"gameid"`
	Loccountrycode           string `json:"loccountrycode"`
	Locstatecode             string `json:"locstatecode"`
}

type PlayerSummaries

type PlayerSummaries struct {
	Response struct {
		Players []PlayerAccount `json:"players" bson:"players"`
	} `json:"response" bson:"response"`
}

type PlayerSummary

type PlayerSummary struct {
	AccountID  int `json:"account_id" bson:"account_id"`
	PlayerSlot int `json:"player_slot" bson:"player_slot"`
	HeroID     int `json:"hero_id" bson:"hero_id"`
}

type PlayersTeam

type PlayersTeam struct {
	TeamName string `json:"team_name" bson:"team_name"`
	TeamID   int    `json:"team_id" bson:"team_id"`
	Complete bool   `json:"complete" bson:"complete"`
}

type Radiant

type Radiant struct {
	Score         int `json:"score" bson:"score"`
	TowerState    int `json:"tower_state" bson:"tower_state"`
	BarracksState int `json:"barracks_state" bson:"barracks_state"`
	Picks         []struct {
		HeroID int `json:"hero_id" bson:"hero_id"`
	} `json:"picks" bson:"picks"`
	Bans []struct {
		HeroID int `json:"hero_id" bson:"hero_id"`
	} `json:"bans" bson:"bans"`
	Players   []LivePlayer `json:"players" bson:"players"`
	Abilities []struct {
		AbilityID    int `json:"ability_id" bson:"ability_id"`
		AbilityLevel int `json:"ability_level" bson:"ability_level"`
	} `json:"abilities" bson:"abilities"`
}

type Scoreboard

type Scoreboard struct {
	Duration           float64 `json:"duration" bson:"duration"`
	RoshanRespawnTimer int     `json:"roshan_respawn_timer" bson:"roshan_respawn"`
	Radiant            Radiant `json:"radiant" bson:"radiant"`
	Dire               Dire    `json:"dire" bson:"dire"`
}

type Vanity

type Vanity struct {
	Response VanityResp `json:"response"`
}

type VanityResp

type VanityResp struct {
	SteamId string `json:"steamid"`
	Success int    `json:"success"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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