warcraftlogs-api: gitlab.com/rakshazi/warcraftlogs-api Index | Files

package warcraftlogs

import "gitlab.com/rakshazi/warcraftlogs-api"

Index

Package Files

fights.go reports.go warcraftlogs.go zones.go

type Fight Uses

type Fight struct {
    Fights     []*Pull   `json:"fights,omitempty"`
    Friendlies []*Raider `json:"friendlies,omitempty"`
}

Fight - actually, report

type Pull Uses

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 Uses

type Raider struct {
    Id     int
    Name   string
    Type   string
    Guid   int
    Server string
    Fights []struct {
        Id int
    }
}

Raider info

type Report Uses

type Report struct {
    Id        string
    Title     string
    Owner     string
    Zone      int64
    StartTime *int64 `json:"start"`
    EndTime   *int64 `json:"end"`
}

type WarcraftLogs Uses

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

WarcraftLogs Client

func New Uses

func New(apiToken string) *WarcraftLogs

New - shortcut to NewRetail(apiToken string)

func NewClassic Uses

func NewClassic(apiToken string) *WarcraftLogs

New WarcraftLogs Client for WoW CLASSIC, with required API Token. Currently using v1 API endpoint as default

func NewRetail Uses

func NewRetail(apiToken string) *WarcraftLogs

New WarcraftLogs Client for RETAIL/actual WoW, with required API Token. Currently using v1 API endpoint as default

func (*WarcraftLogs) Fights Uses

func (w *WarcraftLogs) Fights(code string) (Fight, error)

Fights - get fight from report by report id (code)

func (*WarcraftLogs) Get Uses

func (w *WarcraftLogs) Get(path string, responseHolder interface{}) error

Support function to make an authenticated GET call and parse response JSON to a responseHolder.

func (*WarcraftLogs) ReportsForGuild Uses

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 Uses

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 Uses

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) Zones Uses

func (w *WarcraftLogs) Zones() ([]*Zone, error)

Get zones from api

type Zone Uses

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 Uses

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 Uses

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

Package warcraftlogs imports 7 packages (graph) and is imported by 9 packages. Updated 2020-07-14. Refresh now. Tools for package owners.