Documentation ¶
Index ¶
- type Aura
- type Event
- type Fight
- type Gear
- type Pull
- type Raider
- type Report
- type WarcraftLogs
- func (w *WarcraftLogs) Events(code string, view string, start int, end int) ([]*Event, error)
- func (w *WarcraftLogs) Fights(code string) (Fight, error)
- func (w *WarcraftLogs) Get(path string, responseHolder interface{}) error
- func (w *WarcraftLogs) GetToken() string
- func (w *WarcraftLogs) RemoveToken(remove string)
- func (w *WarcraftLogs) ReportsForGuild(guildName string, realm string, region string) ([]*Report, error)
- func (w *WarcraftLogs) ReportsForUser(userName string) ([]*Report, error)
- func (w *WarcraftLogs) SetEndpoint(endpoint string)
- func (w *WarcraftLogs) SetTokens(tokens []string)
- func (w *WarcraftLogs) Zones() ([]*Zone, error)
- type Zone
- type ZoneBrackets
- type ZoneEncounter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aura ¶ added in v0.2.6
type Aura struct { SourceID int `json:"source,omitempty"` AbilityID int `json:"ability,omitempty"` Stacks int `json:"stacks,omitempty"` Name string `json:"name,omitempty"` }
Aura / buffs info
type Event ¶ added in v0.2.6
type Event struct { Type string `json:"type,omitempty"` Timestamp int `json:"timestamp,omitempty"` EncounterID int `json:"encounterID,omitempty"` Name string `json:"name,omitempty"` SourceID int `json:"sourceID,omitempty"` Gear []Gear `json:"gear,omitempty"` Auras []Aura `json:"auras,omitempty"` }
Event - event info
type Fight ¶
type Fight struct { Fights []*Pull `json:"fights,omitempty"` Friendlies []*Raider `json:"friendlies,omitempty"` }
Fight - actually, report
type Gear ¶ added in v0.2.6
type Gear struct { ID int `json:"id,omitempty"` Quality int `json:"quality,omitempty"` Level int `json:"itemLevel,omitempty"` }
Gear info
type Pull ¶
type Pull struct { Id int StartTime int `json:"start_time"` EndTime int `json:"end_time"` Boss int `json:"boss,omitempty"` Name string `json:"name,omitempty"` Size int `json:"size,omitempty"` Difficulty int `json:"difficulty,omitempty"` Kill bool `json:"kill,omitempty"` Partial int `json:"partial,omitempty"` BossPercentage int `json:"bossPercentage,omitempty"` FightPercentage int `json:"fightPercentage,omitempty"` LastPhaseForPercentageDisplay int `json:"lastPhaseForPercentageDisplay,omitempty"` }
Pull - fight/pull information
type Raider ¶
type Raider struct { Id int Name string Type string Guid int Server string Fights []struct { Id int } }
Raider info
type WarcraftLogs ¶
type WarcraftLogs struct {
// contains filtered or unexported fields
}
WarcraftLogs Client
func NewClassic ¶
func NewClassic(apiToken string) *WarcraftLogs
NewClassic - New WarcraftLogs Client for WoW CLASSIC, with required API Token. Currently using v1 API endpoint as default
func NewRetail ¶
func NewRetail(apiToken string) *WarcraftLogs
NewRetail - New WarcraftLogs Client for RETAIL/actual WoW, with required API Token. Currently using v1 API endpoint as default
func (*WarcraftLogs) Fights ¶
func (w *WarcraftLogs) Fights(code string) (Fight, error)
Fights - get fight from report by report id (code)
func (*WarcraftLogs) Get ¶
func (w *WarcraftLogs) Get(path string, responseHolder interface{}) error
Get - support function to make an authenticated GET call and parse response JSON to a responseHolder.
func (*WarcraftLogs) GetToken ¶
func (w *WarcraftLogs) GetToken() string
GetToken - get random API token from pool
func (*WarcraftLogs) RemoveToken ¶
func (w *WarcraftLogs) RemoveToken(remove string)
RemoveToken - remove token from pool
func (*WarcraftLogs) ReportsForGuild ¶
func (w *WarcraftLogs) ReportsForGuild(guildName string, realm string, region string) ([]*Report, error)
ReportsForGuild returns a list of all reports available for provided guild. Warcraftlogs retention time of reports differs depending on reports tier.
func (*WarcraftLogs) ReportsForUser ¶
func (w *WarcraftLogs) ReportsForUser(userName string) ([]*Report, error)
ReportsForUser returns a list of all reports available for provided user. Warcraftlogs retention time of reports differs depending on reports tier.
func (*WarcraftLogs) SetEndpoint ¶
func (w *WarcraftLogs) SetEndpoint(endpoint string)
SetEndpoint allows customizing API Endpoint that client will use. If provided endoint does not end with a trailing slash, it will be added
func (*WarcraftLogs) SetTokens ¶
func (w *WarcraftLogs) SetTokens(tokens []string)
SetTokens - set list of tokens to api client
type Zone ¶
type Zone struct { Id int `json:"id"` Name string `json:"name"` Frozen bool `json:"frozen"` Encounters []*ZoneEncounter `json:"encounters"` Brackets *ZoneBrackets `json:"brackets"` }
type ZoneBrackets ¶
type ZoneBrackets struct { Min float32 `json:"min"` Max float32 `json:"max"` Type string `json:"type"` }
Zone requirements, type may be patch, ilvl, etc.
type ZoneEncounter ¶
type ZoneEncounter struct { Id int `json:"id"` NpcId int `json:"npcID,omitempty"` Name string `json:"name"` }
Zone Boss, id - warcraft logs internal id, NpcId - real id