dota

package
v0.0.0-...-8cd742b Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2015 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Abilities = []Ability{}/* 570 elements not displayed */

Abilities is a list of every ability in Dota 2

View Source
var GameModes = []GameMode{
	GameMode{
		ID:   0,
		Name: "No Game Mode",
	},
	GameMode{
		ID:   1,
		Name: "All Pick",
	},
	GameMode{
		ID:   2,
		Name: "Captain's Mode",
	},
	GameMode{
		ID:   3,
		Name: "Random Draft",
	},
	GameMode{
		ID:   4,
		Name: "Single Draft",
	},
	GameMode{
		ID:   5,
		Name: "All Random",
	},
	GameMode{
		ID:   7,
		Name: "Diretide",
	},
	GameMode{
		ID:   8,
		Name: "Reverse Captain's Mode",
	},
	GameMode{
		ID:   9,
		Name: "Greeviling",
	},
	GameMode{
		ID:   10,
		Name: "Tutorial",
	},
	GameMode{
		ID:   11,
		Name: "Mid Only",
	},
	GameMode{
		ID:   12,
		Name: "Least Played",
	},
	GameMode{
		ID:   13,
		Name: "New Player Pool",
	},
	GameMode{
		ID:   14,
		Name: "Compendium Matchmaking",
	},
	GameMode{
		ID:   15,
		Name: "Custom",
	},
	GameMode{
		ID:   16,
		Name: "Captain's Draft",
	},
	GameMode{
		ID:   17,
		Name: "Balanced Draft",
	},
	GameMode{
		ID:   18,
		Name: "Ability Draft",
	},
	GameMode{
		ID:   20,
		Name: "All Random Deathmatch",
	},
	GameMode{
		ID:   21,
		Name: "Solo Mid 1v1",
	},
	GameMode{
		ID:   22,
		Name: "Ranked All Pick",
	},
}

GameModes is a list of all GameModes currently in DOTA 2

View Source
var Heroes = []Hero{}/* 111 elements not displayed */

Heroes is a list of all Heroes currently in Dota 2

View Source
var Items = []Item{}/* 247 elements not displayed */

Items is a list of all current DOTA 2 items unobtainable via an API, so hardcoded here.

View Source
var Lobbies = []Lobby{
	Lobby{
		ID:   -1,
		Name: "Invalid",
	},
	Lobby{
		ID:   0,
		Name: "Public Matchmaking",
	},
	Lobby{
		ID:   1,
		Name: "Practice",
	},
	Lobby{
		ID:   2,
		Name: "Tournament",
	},
	Lobby{
		ID:   3,
		Name: "Tutorial",
	},
	Lobby{
		ID:   4,
		Name: "Co-Op with bots",
	},
	Lobby{
		ID:   5,
		Name: "Team Match",
	},
	Lobby{
		ID:   6,
		Name: "Solo Queue",
	},
	Lobby{
		ID:   7,
		Name: "Ranked",
	},
	Lobby{
		ID:   8,
		Name: "Solo Mid 1vs1",
	},
}

Lobbies is a list of all lobby types currently in Dota 2

View Source
var Regions = []Region{
	Region{
		ID:   111,
		Name: "US West",
	},
	Region{
		ID:   112,
		Name: "US West",
	},
	Region{
		ID:   114,
		Name: "US West",
	},
	Region{
		ID:   121,
		Name: "US East",
	},
	Region{
		ID:   122,
		Name: "US East",
	},
	Region{
		ID:   123,
		Name: "US East",
	},
	Region{
		ID:   124,
		Name: "US East",
	},
	Region{
		ID:   131,
		Name: "Europe West",
	},
	Region{
		ID:   132,
		Name: "Europe West",
	},
	Region{
		ID:   133,
		Name: "Europe West",
	},
	Region{
		ID:   134,
		Name: "Europe West",
	},
	Region{
		ID:   135,
		Name: "Europe West",
	},
	Region{
		ID:   136,
		Name: "Europe West",
	},
	Region{
		ID:   142,
		Name: "South Korea",
	},
	Region{
		ID:   143,
		Name: "South Korea",
	},
	Region{
		ID:   151,
		Name: "Southeast Asia",
	},
	Region{
		ID:   152,
		Name: "Southeast Asia",
	},
	Region{
		ID:   153,
		Name: "Southeast Asia",
	},
	Region{
		ID:   161,
		Name: "China",
	},
	Region{
		ID:   163,
		Name: "China",
	},
	Region{
		ID:   171,
		Name: "Australia",
	},
	Region{
		ID:   181,
		Name: "Russia",
	},
	Region{
		ID:   182,
		Name: "Russia",
	},
	Region{
		ID:   183,
		Name: "Russia",
	},
	Region{
		ID:   184,
		Name: "Russia",
	},
	Region{
		ID:   185,
		Name: "Russia",
	},
	Region{
		ID:   186,
		Name: "Russia",
	},
	Region{
		ID:   191,
		Name: "Europe East",
	},
	Region{
		ID:   192,
		Name: "Europe East",
	},
	Region{
		ID:   200,
		Name: "South America",
	},
	Region{
		ID:   202,
		Name: "South America",
	},
	Region{
		ID:   203,
		Name: "South America",
	},
	Region{
		ID:   204,
		Name: "South America",
	},
	Region{
		ID:   211,
		Name: "South Africa",
	},
	Region{
		ID:   212,
		Name: "South Africa",
	},
	Region{
		ID:   213,
		Name: "South Africa",
	},
	Region{
		ID:   221,
		Name: "China",
	},
	Region{
		ID:   222,
		Name: "China",
	},
	Region{
		ID:   223,
		Name: "China",
	},
	Region{
		ID:   224,
		Name: "China",
	},
	Region{
		ID:   225,
		Name: "China",
	},
	Region{
		ID:   231,
		Name: "China",
	},
	Region{
		ID:   242,
		Name: "Chile",
	},
	Region{
		ID:   251,
		Name: "Peru",
	},
	Region{
		ID:   261,
		Name: "India",
	},
}

Regions is a list of all current Dota2 Regions

Functions

This section is empty.

Types

type Ability

type Ability struct {
	ID   int    `json:"id"`
	Name string `json:"ability_name"`
}

An Ability is one of 500~ usable skills in Dota2

type Barrack

type Barrack struct {
	Location  string `json:"location"`
	Destroyed bool   `json:"destroyed"`
}

A Barrack is... self-explanatory

type BuildingStatus

type BuildingStatus struct {
	Barracks []Barrack `json:"barracks_status"`
	Towers   []Tower   `json:"tower_status"`
}

BuildingStatus holds data about the endgame result of each teams buildings

type Draft

type Draft struct {
	FirstPick string `json:"first_pick"`

	RadiantPicks []int `json:"radiant_picks"`
	RadiantBans  []int `json:"radiant_bans"`

	DirePicks []int `json:"dire_picks"`
	DireBans  []int `json:"dire_bans"`
}

A Draft only exists for Captain's game modes for specific information on order, check out http://dota2.gamepedia.com/Game_modes#Captains_Mode

type GameMode

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

GameMode is a specific type of Game - mapped to numbers by the WebAPI

type Hero

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

A Hero maps 1-to-1 with a DOTA 2 hero, providing all relevant information.

type Item

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

Item is something held by a Hero, typically...

func (*Item) String

func (i *Item) String() string

String makes Item a Stringer

type LeaverStatus

type LeaverStatus int

LeaverStatus is the endgame status of a player in a match

const (
	// Finished the game, no problem
	Finished LeaverStatus = iota
	// DisconnectedNoAbandon - disconncted, but didn't abandon
	DisconnectedNoAbandon
	// DisconnectedAbandon - disconnected too long, abandoned
	DisconnectedAbandon
	// Abandoned - manually clicked Abandon
	Abandoned
	// NeverConnected - didn't connect
	NeverConnected
	// TooLongToConnect - took too long to connect
	TooLongToConnect
)

type LevelUp

type LevelUp struct {
	ID    int    `json:"id"`
	Level int    `json:"level"`
	Time  string `json:"time"`
	Name  string `json:"ability_name"`
}

A LevelUp occurs when a player chooses to skill a particular skill...

type Lobby

type Lobby struct {
	ID   int
	Name string
}

A Lobby is what environment a match was played in, ie. Ranked or Unranked.

type Match

type Match struct {
	MatchID          int            `json:"match_id"`
	Dire             []Player       `json:"dire_players"`
	DireBuildings    BuildingStatus `json:"dire_building_status"`
	Radiant          []Player       `json:"radiant_players"`
	RadiantBuildings BuildingStatus `json:"radiant_building_status"`

	Victor     string    `json:"victor"`
	Duration   string    `json:"duration"`
	StartTime  time.Time `json:"start_time"`
	FirstBlood string    `json:"first_blood_time"`
	LobbyType  Lobby     `json:"lobby_type"`
	LeagueID   int       `json:"leagueid"`

	Draft *Draft `json:"draft,omitempty"`
	Lobby Lobby  `json:"lobby_type"`

	Region   Region   `json:"region"`
	GameMode GameMode `json:"game_mode"`
	Engine   string   `json:"game_engine"`
}

Match is a fully parsed dota 2 match

type Player

type Player struct {
	ID           int          `json:"player_id"`
	Hero         Hero         `json:"hero"`
	Kills        int          `json:"kills"`
	Deaths       int          `json:"deaths"`
	Assists      int          `json:"assists"`
	LeaverStatus LeaverStatus `json:"leaver_status"`
	Gold         int          `json:"gold"`
	LastHits     int          `json:"last_hits"`
	Denies       int          `json:"denies"`
	GPM          int          `json:"gpm"`
	XPM          int          `json:"xpm"`
	GoldSpent    int          `json:"gold_spent"`
	HeroDamage   int          `json:"hero_damage"`
	TowerDamage  int          `json:"tower_damage"`
	HeroHealing  int          `json:"hero_healing"`
	Level        int          `json:"level"`
	Items        []Item       `json:"items"`
	// in order, the skill build of this player this game
	SkillBuild []LevelUp   `json:"skill_build,omitempty"`
	SpiritBear *SpiritBear `json:"spirit_bear,omitempty"`
}

Player is a player in a match

type Region

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

A Region is a cluster location more than likely, IP addresses can be added in here

type SpiritBear

type SpiritBear struct {
	Items []Item `json:"items"`
}

The SpiritBear is the only additional unit currently in DOTA2 - it has it's own inventory, tied to a player, if that player is playing Lone Druid.

type Tower

type Tower struct {
	Location  string `json:"location"`
	Destroyed bool   `json:"destroyed"`
}

A Tower is a single tower

Jump to

Keyboard shortcuts

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