Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetMatchDetails ¶
type GetMatchDetails struct { Result struct { Players []struct { // account_id - the player's 32-bit Steam ID - will be set to // "4294967295" if the account is private // or "0" if the player is a bot AccountID int `json:"account_id"` // player_slot - an 8-bit unsigned int: if the left-most bit is set, // the player was on dire. the two right-most bits represent the // player slot (0-4) PlayerSlot uint8 `json:"player_slot"` HeroID int `json:"hero_id"` // item_0 - the numeric ID of the item in the top-left slot. Item0 int `json:"item_0"` // item_1 - the numeric ID of the item in the top-center slot. Item1 int `json:"item_1"` // item_2 - the numeric ID of the item in the top-right slot. Item2 int `json:"item_2"` // item_3 - the numeric ID of the item in the bottom-left slot. Item3 int `json:"item_3"` // item_4 - the numeric ID of the item in the bottom-center slot. Item4 int `json:"item_4"` // item_5 - the numeric ID of the item in the bottom-right slot. Item5 int `json:"item_5"` Kills int `json:"kills"` Deaths int `json:"deaths"` Assists int `json:"assists"` LeaverStatus int `json:"leaver_status"` Gold int `json:"gold"` LastHits int `json:"last_hits"` Denies int `json:"denies"` GoldPerMin int `json:"gold_per_min"` XpPerMin int `json:"xp_per_min"` GoldSpent int `json:"gold_spent"` HeroDamage int `json:"hero_damage"` TowerDamage int `json:"tower_damage"` HeroHealing int `json:"hero_healing"` Level int `json:"level"` // an array detailing the order in which a player's ability points were spent. AbilityUpgrades []struct { // the numeric ID of the ability that the point was spent on. Ability int `json:"ability"` // number of seconds since the start of the match. Time int `json:"time"` // level of the hero when the ability was leveled. Level int `json:"level"` } `json:"ability_upgrades"` AdditionalUnits []struct { Unitname string `json:"unitname"` Item0 int `json:"item_0"` Item1 int `json:"item_1"` Item2 int `json:"item_2"` Item3 int `json:"item_3"` Item4 int `json:"item_4"` Item5 int `json:"item_5"` } `json:"additional_units"` } `json:"players"` Draft []Pick `json:"picks_bans"` RadiantWin bool `json:"radiant_win"` Duration int `json:"duration"` StartTime int64 `json:"start_time"` MatchID int `json:"match_id"` MatchSeqNum int `json:"match_seq_num"` TowerStatusRadiant uint16 `json:"tower_status_radiant"` TowerStatusDire uint16 `json:"tower_status_dire"` BarracksStatusRadiant uint8 `json:"barracks_status_radiant"` BarracksStatusDire uint8 `json:"barracks_status_dire"` Cluster int `json:"cluster"` FirstBloodTime int `json:"first_blood_time"` LobbyType int `json:"lobby_type"` HumanPlayers int `json:"human_players"` LeagueID int `json:"leagueid"` PositiveVotes int `json:"positive_votes"` NegativeVotes int `json:"negative_votes"` GameMode int `json:"game_mode"` Engine int `json:"engine"` } `json:"result"` }
GetMatchDetails returns specific information about a single match, matching what's returned by https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?key=<key>&match_id=<match_id>
func (*GetMatchDetails) ParseMatch ¶
func (md *GetMatchDetails) ParseMatch() (*dota.Match, error)
ParseMatch turns the Valve JSON matchdetails into a usable *dota.Match
type GetMatchHistory ¶
type GetMatchHistory struct { Result struct { Status int `json:"status"` NumResults int `json:"num_results"` TotalResults int `json:"total_results"` ResultsRemaining int `json:"results_remaining"` Matches []struct { MatchID int `json:"match_id"` MatchSeqNum int `json:"match_seq_num"` StartTime int64 `json:"start_time"` LobbyType int `json:"lobby_type"` RadiantTeamID int `json:"radiant_team_id"` DireTeamID int `json:"dire_team_id"` Players []struct { AccountID int `json:"account_id"` PlayerSlot int `json:"player_slot"` HeroID int `json:"hero_id"` } `json:"players"` } `json:"matches"` } `json:"result"` }
GetMatchHistory maps to the JSON returned from the API endpoint found at https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V001/?key=<key> this endpoint returns very little data about the actual match
the other MatchHistory endpoint uses the same JSON structure as this one -> http://api.steampowered.com/IDOTA2Match_<ID>/GetMatchHistoryBySequenceNum/V001/?key=<key> but has different parameters - not documented here, nor used by tango
player_name=<name> # Search matches with a player name, exact match only hero_id=<id> # Search for matches with a specific hero being played, hero id's are in dota/scripts/npc/npc_heroes.txt in your Dota install directory skill=<skill> # 0 for any, 1 for normal, 2 for high, 3 for very high skill date_min=<date> # date in UTC seconds since Jan 1, 1970 (unix time format) date_max=<date> # date in UTC seconds since Jan 1, 1970 (unix time format) account_id=<id> # Steam account id (this is not SteamID, its only the account number portion) league_id=<id> # matches for a particular league start_at_match_id=<id> # Start the search at the indicated match id, descending matches_requested=<n> # Defaults is 25 matches, this can limit to less