dota

package
v0.0.0-...-e842009 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ability

type Ability struct {
	Id           uint `json:"ability"`
	TimeUpgraded int  `json:"time"`
	Level        uint
}

type DotaBarracksStatus

type DotaBarracksStatus uint16

TODO: add methods that read information from bits

type DotaGameMode

type DotaGameMode int
const (
	AnyMode = -1

	AllPick DotaGameMode = iota
	SingleDraft
	AllRandom
	RandomDraft
	CaptainsDraft
	CaptainsMode
	DeathMode
	Diretide
	ReverseCaptainsMode
	TheGreeviling
	TutorialGame
	MidOnly
	LeastPlayed
	NewPlayerPool
	CompendiumMatchmaking
)

type DotaHero

type DotaHero uint

type DotaLeaverStatus

type DotaLeaverStatus uint
const (
	None DotaLeaverStatus = iota
	Disconnected
	DisconnectedTooLong
	Abandoned
	AFK
	NeverConnected
	NeverConnectedTooLong
)

type DotaLobbyType

type DotaLobbyType int
const (
	Invalid DotaLobbyType = -1

	PublicMatchMaking DotaLobbyType = iota
	Practice
	Tournament
	Tutorial
	Coop
	TeamMatch
	SoloQueue
)

type DotaPlayerSlot

type DotaPlayerSlot uint8

func (DotaPlayerSlot) GetPosition

func (d DotaPlayerSlot) GetPosition() (p uint)

func (DotaPlayerSlot) IsDire

func (d DotaPlayerSlot) IsDire() bool

type DotaSkill

type DotaSkill uint
const (
	AnySkill DotaSkill = iota
	Normal
	High
	VeryHigh
)

type DotaTeam

type DotaTeam uint
const (
	Radiant DotaTeam = iota
	Dire
)

type DotaTowerStatus

type DotaTowerStatus uint16

TODO: add methods that read information from bits

type HistoryResult

type HistoryResult struct {
	Status           uint
	StatusDetail     string `json:",omitempty"`
	NumResults       uint   `json:"num_results"`
	TotalResults     uint   `json:"total_results"`
	ResultsRemaining uint   `json:"results_remaining"`
	Matches          []Match
}

type Match

type Match struct {
	MatchId         uint64        `json:"match_id"`
	MatchSequenceNo uint          `json:"match_seq_num"`
	MatchStart      uint          `json:"start_time"`
	LobbyType       DotaLobbyType `json:"lobby_type"`
	Players         []PlayerSummary
}

func GetMatchHistory

func GetMatchHistory(filter MatchFilter, gameMode DotaGameMode, app int, apiKey string) ([]Match, error)

type MatchFilter

type MatchFilter struct {
	PlayerName       string
	HeroId           DotaHero
	Skill            DotaSkill
	DateMin          time.Time
	DateMax          time.Time
	MinPlayers       uint
	AccountId        uint32
	LeagueId         uint32
	StartAtMatchId   uint64
	MatchesRequested uint
}

type MatchResult

type MatchResult struct {
	Players               []Player
	Season                uint `json:"item_0,omitempty"`
	RadiantWin            bool `json:"radiant_win"`
	Duration              uint
	MatchStart            uint               `json:"start_time"`
	MatchId               uint64             `json:"match_id"`
	MatchSequenceNo       uint               `json:"match_seq_num"`
	TowerStatusRadiant    DotaTowerStatus    `json:"tower_status_radiant"`
	TowerStatusDire       DotaTowerStatus    `json:"tower_status_dire"`
	BarracksStatusRadiant DotaBarracksStatus `json:"barracks_status_radiant"`
	BarracksStatusDire    DotaBarracksStatus `json:"barracks_status_dire"`
	Cluster               uint
	FirstBloodTime        int           `json:"first_blood_time"`
	LobbyType             DotaLobbyType `json:"lobby_type"`
	HumanPlayers          uint          `json:"human_players"`
	LeagueId              uint
	PositiveVotes         uint         `json:"positive_votes"`
	NegativeVotes         uint         `json:"negative_votes"`
	GameMode              DotaGameMode `json:"game_mode"`
	PicksBans             []PickBan    `json:"picks_bans,omitempty"`
}

func GetMatchDetails

func GetMatchDetails(matchid uint64, app int, apiKey string) (*MatchResult, error)

Fetches statistics of a specific Match.

type PickBan

type PickBan struct {
	IsPick bool `json:"is_pick"`
	HeroId uint `json:"hero_id"`
	Team   DotaTeam
	Order  uint
}

type Player

type Player struct {
	AccountId     uint32         `json:"account_id"`
	PlayerSlot    DotaPlayerSlot `json:"player_slot"`
	HeroId        uint           `json:"hero_id"`
	Item0         uint           `json:"item_0"`
	Item1         uint           `json:"item_1"`
	Item2         uint           `json:"item_2"`
	Item3         uint           `json:"item_3"`
	Item4         uint           `json:"item_4"`
	Item5         uint           `json:"item_5"`
	Kills         uint
	Deaths        uint
	Assists       uint
	LeaverStatus  DotaLeaverStatus `json:"leaver_status"`
	GoldRemaining uint             `json:"gold"`
	LastHits      uint             `json:"last_hits"`
	Denies        uint             `json:"denies"`
	GPM           uint             `json:"gold_per_min"`
	XPM           uint             `json:"xp_per_min"`
	GoldSpent     uint             `json:"gold_spent"`
	HeroDamage    uint             `json:"hero_damage"`
	TowerDamage   uint             `json:"tower_damage"`
	HeroHealing   uint             `json:"hero_healing"`
	Level         uint
	Abilities     []Ability `json:"ability_upgrades"`
	Units         []Unit    `json:"additional_units,omitempty"`
}

type PlayerSummary

type PlayerSummary struct {
	AccountId  uint32         `json:"account_id"`
	PlayerSlot DotaPlayerSlot `json:"player_slot"`
	HeroId     uint           `json:"hero_id"`
}

type Unit

type Unit struct {
	Name  string `json:"unitname"`
	Item0 uint   `json:"item_0"`
	Item1 uint   `json:"item_1"`
	Item2 uint   `json:"item_2"`
	Item3 uint   `json:"item_3"`
	Item4 uint   `json:"item_4"`
	Item5 uint   `json:"item_5"`
}

Jump to

Keyboard shortcuts

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