Documentation
¶
Overview ¶
Package warcraftlogs is a client for the Warcraft Logs v2 GraphQL API.
It handles OAuth 2.0 authentication (client credentials, authorization code, and PKCE), request retries, and rate-limit inspection. Typed operations are generated from the API schema; Client.Execute runs arbitrary queries for anything the typed layer does not cover.
client, err := warcraftlogs.New(ctx,
warcraftlogs.WithClientCredentials(id, secret))
if err != nil {
return err
}
limit, err := client.RateLimit(ctx)
Index ¶
- Constants
- Variables
- func HTTPStatus(err error) (int, bool)
- func IsBlocked(err error) bool
- func IsRateLimited(err error) bool
- func IsUnauthorized(err error) bool
- func OAuthConfig(clientID, clientSecret, redirectURL string, scopes ...string) *oauth2.Config
- type CDNError
- type Character
- func (v *Character) GetCanonicalID() int
- func (v *Character) GetClassID() int
- func (v *Character) GetFaction() Faction
- func (v *Character) GetGuildRank() int
- func (v *Character) GetHidden() bool
- func (v *Character) GetId() int
- func (v *Character) GetLevel() int
- func (v *Character) GetName() string
- func (v *Character) GetServer() Server
- type CharacterPageRankingMetricType
- type CharacterRankingMetricType
- type CharacterRef
- type Client
- func (c *Client) Ability(ctx context.Context, id int) (*GameAbility, error)
- func (c *Client) Character(ctx context.Context, id int) (*Character, error)
- func (c *Client) CharacterByName(ctx context.Context, name, serverSlug, serverRegion string) (*Character, error)
- func (c *Client) CharacterEncounterRankings(ctx context.Context, p EncounterRankingsParams) (json.RawMessage, error)
- func (c *Client) CharacterZoneRankings(ctx context.Context, p ZoneRankingsParams) (json.RawMessage, error)
- func (c *Client) Classes(ctx context.Context, factionID, zoneID int) ([]GameClass, error)
- func (c *Client) CurrentUser(ctx context.Context) (*CurrentUser, error)
- func (c *Client) Encounter(ctx context.Context, id int) (*Encounter, error)
- func (c *Client) EncounterLeaderboard(ctx context.Context, p EncounterLeaderboardParams) (json.RawMessage, error)
- func (c *Client) Endpoint() string
- func (c *Client) Execute(ctx context.Context, query string, variables map[string]any, out any) error
- func (c *Client) Expansion(ctx context.Context, id int) (*Expansion, error)
- func (c *Client) Expansions(ctx context.Context) ([]Expansion, error)
- func (c *Client) GraphQL() graphql.Client
- func (c *Client) Guild(ctx context.Context, id int) (*Guild, error)
- func (c *Client) GuildByName(ctx context.Context, name, serverSlug, serverRegion string) (*Guild, error)
- func (c *Client) Item(ctx context.Context, id int) (*GameItem, error)
- func (c *Client) NPC(ctx context.Context, id int) (*GameNPC, error)
- func (c *Client) RateLimit(ctx context.Context) (RateLimit, error)
- func (c *Client) Regions(ctx context.Context) ([]Region, error)
- func (c *Client) Report(ctx context.Context, code string, allowUnlisted bool) (*Report, error)
- func (c *Client) ReportActors(ctx context.Context, p ReportActorsParams) ([]ReportActor, error)
- func (c *Client) ReportEvents(ctx context.Context, dataType EventDataType, p ReportEventsParams) (EventPage, error)
- func (c *Client) ReportEventsAll(ctx context.Context, dataType EventDataType, p ReportEventsParams) iter.Seq2[json.RawMessage, error]
- func (c *Client) ReportGraph(ctx context.Context, dataType GraphDataType, p ReportAnalysisParams) (json.RawMessage, error)
- func (c *Client) ReportMasterData(ctx context.Context, code string, translate bool) (ReportMasterData, error)
- func (c *Client) ReportPlayerDetails(ctx context.Context, p PlayerDetailsParams) (json.RawMessage, error)
- func (c *Client) ReportRankings(ctx context.Context, p ReportRankingsParams) (json.RawMessage, error)
- func (c *Client) ReportTable(ctx context.Context, dataType TableDataType, p ReportAnalysisParams) (json.RawMessage, error)
- func (c *Client) ReportWithFights(ctx context.Context, p ReportWithFightsParams) (*ReportWithFights, error)
- func (c *Client) Reports(ctx context.Context, p ReportsParams) (ReportPage, error)
- func (c *Client) Server(ctx context.Context, id int) (*Server, error)
- func (c *Client) ServerBySlug(ctx context.Context, region, slug string) (*Server, error)
- func (c *Client) User(ctx context.Context, id int) (*User, error)
- func (c *Client) Zone(ctx context.Context, id int) (*Zone, error)
- func (c *Client) Zones(ctx context.Context, expansionID int) ([]Zone, error)
- type CurrentUser
- type Encounter
- type EncounterLeaderboardParams
- type EncounterPhases
- type EncounterRankingsParams
- type EventDataType
- type EventPage
- type Expansion
- type ExpansionSummary
- type ExpansionZonesZone
- type Faction
- type GameAbility
- type GameClass
- type GameClassSpecsGameSpec
- type GameItem
- type GameNPC
- type GameZoneSummary
- type GraphDataType
- type GraphQLError
- type Guild
- type GuildSummary
- type HostilityType
- type KillType
- type Location
- type Option
- func WithBaseTransport(rt http.RoundTripper) Option
- func WithClientCredentials(id, secret string) Option
- func WithEndpoint(url string) Option
- func WithHTTPClient(hc *http.Client) Option
- func WithLogger(l *slog.Logger) Option
- func WithMaxRetries(n int) Option
- func WithScopes(scopes ...string) Option
- func WithTimeout(d time.Duration) Option
- func WithTokenSource(ts oauth2.TokenSource) Option
- func WithTokenURL(url string) Option
- func WithUserAgent(ua string) Option
- type PhaseMetadata
- type PhaseTransition
- type PlayerDetailsParams
- type RankingCompareType
- type RankingTimeframeType
- type RateLimit
- type Region
- type RegionSubregionsSubregion
- type RegionSummary
- type Report
- func (v *Report) GetArchiveStatus() ReportArchiveStatus
- func (v *Report) GetCode() string
- func (v *Report) GetEndTime() float64
- func (v *Report) GetExportedSegments() int
- func (v *Report) GetGuild() GuildSummary
- func (v *Report) GetOwner() User
- func (v *Report) GetRegion() ReportRegion
- func (v *Report) GetRevision() int
- func (v *Report) GetSegments() int
- func (v *Report) GetStartTime() float64
- func (v *Report) GetTitle() string
- func (v *Report) GetVisibility() string
- func (v *Report) GetZone() ZoneSummary
- func (v *Report) MarshalJSON() ([]byte, error)
- func (v *Report) UnmarshalJSON(b []byte) error
- type ReportAbility
- type ReportActor
- func (v *ReportActor) GetGameID() float64
- func (v *ReportActor) GetIcon() string
- func (v *ReportActor) GetId() int
- func (v *ReportActor) GetName() string
- func (v *ReportActor) GetPetOwner() int
- func (v *ReportActor) GetServer() string
- func (v *ReportActor) GetSubType() string
- func (v *ReportActor) GetType() string
- type ReportActorsParams
- type ReportAnalysisParams
- type ReportArchiveStatus
- type ReportEventsParams
- type ReportFight
- func (v *ReportFight) GetAverageItemLevel() *float64
- func (v *ReportFight) GetBossPercentage() *float64
- func (v *ReportFight) GetCompleteRaid() bool
- func (v *ReportFight) GetDifficulty() *int
- func (v *ReportFight) GetEncounterID() int
- func (v *ReportFight) GetEndTime() float64
- func (v *ReportFight) GetEnemyPlayers() []int
- func (v *ReportFight) GetFightPercentage() *float64
- func (v *ReportFight) GetFriendlyPlayers() []int
- func (v *ReportFight) GetGameZone() GameZoneSummary
- func (v *ReportFight) GetHardModeLevel() *int
- func (v *ReportFight) GetId() int
- func (v *ReportFight) GetInProgress() *bool
- func (v *ReportFight) GetKeystoneAffixes() []int
- func (v *ReportFight) GetKeystoneBonus() *int
- func (v *ReportFight) GetKeystoneLevel() *int
- func (v *ReportFight) GetKeystoneTime() *int
- func (v *ReportFight) GetKill() *bool
- func (v *ReportFight) GetLastPhase() *int
- func (v *ReportFight) GetLastPhaseAsAbsoluteIndex() *int
- func (v *ReportFight) GetLastPhaseIsIntermission() *bool
- func (v *ReportFight) GetName() string
- func (v *ReportFight) GetOriginalEncounterID() *int
- func (v *ReportFight) GetPhaseTransitions() []PhaseTransition
- func (v *ReportFight) GetSize() *int
- func (v *ReportFight) GetStartTime() float64
- func (f *ReportFight) PhaseAt(t float64) (PhaseTransition, bool)
- type ReportMasterData
- type ReportPage
- func (v *ReportPage) GetCurrentPage() int
- func (v *ReportPage) GetData() []ReportSummary
- func (v *ReportPage) GetFrom() int
- func (v *ReportPage) GetHasMorePages() bool
- func (v *ReportPage) GetLastPage() int
- func (v *ReportPage) GetPerPage() int
- func (v *ReportPage) GetTo() int
- func (v *ReportPage) GetTotal() int
- type ReportRankingMetricType
- type ReportRankingsParams
- type ReportRegion
- type ReportSummary
- func (v *ReportSummary) GetCode() string
- func (v *ReportSummary) GetEndTime() float64
- func (v *ReportSummary) GetGuild() GuildSummary
- func (v *ReportSummary) GetOwner() User
- func (v *ReportSummary) GetStartTime() float64
- func (v *ReportSummary) GetTitle() string
- func (v *ReportSummary) GetZone() ZoneSummary
- type ReportWithFights
- type ReportWithFightsParams
- type ReportsParams
- type RoleType
- type Server
- type TableDataType
- type User
- type ViewType
- type Zone
- func (v *Zone) GetBrackets() ZoneBracketsBracket
- func (v *Zone) GetDifficulties() []ZoneDifficultiesDifficulty
- func (v *Zone) GetEncounters() []ZoneEncountersEncounter
- func (v *Zone) GetExpansion() ExpansionSummary
- func (v *Zone) GetFrozen() bool
- func (v *Zone) GetId() int
- func (v *Zone) GetName() string
- func (v *Zone) GetPartitions() []ZonePartitionsPartition
- type ZoneBracketsBracket
- type ZoneDifficultiesDifficulty
- type ZoneEncountersEncounter
- type ZonePartitionsPartition
- type ZoneRankingsParams
- type ZoneSummary
Examples ¶
Constants ¶
const ( // ClientEndpoint is the public API, accessed with the client-credentials flow. ClientEndpoint = "https://www.warcraftlogs.com/api/v2/client" // UserEndpoint is the private API, accessed with the authorization-code or PKCE flow. UserEndpoint = "https://www.warcraftlogs.com/api/v2/user" // AuthorizeURL is the OAuth 2.0 authorization endpoint. AuthorizeURL = "https://www.warcraftlogs.com/oauth/authorize" // TokenURL is the OAuth 2.0 token endpoint. TokenURL = "https://www.warcraftlogs.com/oauth/token" )
const ( ActorPlayer = "Player" ActorNPC = "NPC" ActorPet = "Pet" ActorBoss = "Boss" )
Actor types and sub-types accepted by ReportActorsParams. The API matches these case-sensitively against its own actor classification.
Variables ¶
var AllCharacterPageRankingMetricType = []CharacterPageRankingMetricType{ CharacterPageRankingMetricTypeBosscdps, CharacterPageRankingMetricTypeBossdps, CharacterPageRankingMetricTypeBossndps, CharacterPageRankingMetricTypeBossrdps, CharacterPageRankingMetricTypeDefault, CharacterPageRankingMetricTypeDps, CharacterPageRankingMetricTypeHps, CharacterPageRankingMetricTypeKrsi, CharacterPageRankingMetricTypePlayerscore, CharacterPageRankingMetricTypePlayerspeed, CharacterPageRankingMetricTypeCdps, CharacterPageRankingMetricTypeNdps, CharacterPageRankingMetricTypeRdps, CharacterPageRankingMetricTypeTankhps, CharacterPageRankingMetricTypeWdps, CharacterPageRankingMetricTypeHealercombineddps, CharacterPageRankingMetricTypeHealercombinedbossdps, CharacterPageRankingMetricTypeHealercombinedcdps, CharacterPageRankingMetricTypeHealercombinedbosscdps, CharacterPageRankingMetricTypeHealercombinedndps, CharacterPageRankingMetricTypeHealercombinedbossndps, CharacterPageRankingMetricTypeHealercombinedrdps, CharacterPageRankingMetricTypeHealercombinedbossrdps, CharacterPageRankingMetricTypeTankcombineddps, CharacterPageRankingMetricTypeTankcombinedbossdps, CharacterPageRankingMetricTypeTankcombinedcdps, CharacterPageRankingMetricTypeTankcombinedbosscdps, CharacterPageRankingMetricTypeTankcombinedndps, CharacterPageRankingMetricTypeTankcombinedbossndps, CharacterPageRankingMetricTypeTankcombinedrdps, CharacterPageRankingMetricTypeTankcombinedbossrdps, CharacterPageRankingMetricTypePointsAndDamage, CharacterPageRankingMetricTypePointsAndHealing, }
var AllCharacterRankingMetricType = []CharacterRankingMetricType{ CharacterRankingMetricTypeBosscdps, CharacterRankingMetricTypeBossdps, CharacterRankingMetricTypeBossndps, CharacterRankingMetricTypeBossrdps, CharacterRankingMetricTypeDefault, CharacterRankingMetricTypeDps, CharacterRankingMetricTypeHps, CharacterRankingMetricTypeKrsi, CharacterRankingMetricTypePlayerscore, CharacterRankingMetricTypePlayerspeed, CharacterRankingMetricTypeCdps, CharacterRankingMetricTypeNdps, CharacterRankingMetricTypeRdps, CharacterRankingMetricTypeTankhps, CharacterRankingMetricTypeWdps, CharacterRankingMetricTypeHealercombineddps, CharacterRankingMetricTypeHealercombinedbossdps, CharacterRankingMetricTypeHealercombinedcdps, CharacterRankingMetricTypeHealercombinedbosscdps, CharacterRankingMetricTypeHealercombinedndps, CharacterRankingMetricTypeHealercombinedbossndps, CharacterRankingMetricTypeHealercombinedrdps, CharacterRankingMetricTypeHealercombinedbossrdps, CharacterRankingMetricTypeTankcombineddps, CharacterRankingMetricTypeTankcombinedbossdps, CharacterRankingMetricTypeTankcombinedcdps, CharacterRankingMetricTypeTankcombinedbosscdps, CharacterRankingMetricTypeTankcombinedndps, CharacterRankingMetricTypeTankcombinedbossndps, CharacterRankingMetricTypeTankcombinedrdps, CharacterRankingMetricTypeTankcombinedbossrdps, }
var AllEventDataType = []EventDataType{ EventDataTypeAll, EventDataTypeBuffs, EventDataTypeCasts, EventDataTypeCombatantInfo, EventDataTypeDamageDone, EventDataTypeDamageTaken, EventDataTypeDeaths, EventDataTypeDebuffs, EventDataTypeDispels, EventDataTypeHealing, EventDataTypeInterrupts, EventDataTypeResources, EventDataTypeSummons, EventDataTypeThreat, }
var AllGraphDataType = []GraphDataType{ GraphDataTypeSummary, GraphDataTypeBuffs, GraphDataTypeCasts, GraphDataTypeDamageDone, GraphDataTypeDamageTaken, GraphDataTypeDeaths, GraphDataTypeDebuffs, GraphDataTypeDispels, GraphDataTypeHealing, GraphDataTypeInterrupts, GraphDataTypeResources, GraphDataTypeSummons, GraphDataTypeSurvivability, GraphDataTypeThreat, }
var AllHostilityType = []HostilityType{ HostilityTypeFriendlies, HostilityTypeEnemies, }
var AllKillType = []KillType{ KillTypeAll, KillTypeEncounters, KillTypeKills, KillTypeTrash, KillTypeWipes, }
var AllRankingCompareType = []RankingCompareType{ RankingCompareTypeRankings, RankingCompareTypeParses, }
var AllRankingTimeframeType = []RankingTimeframeType{ RankingTimeframeTypeToday, RankingTimeframeTypeHistorical, }
var AllReportRankingMetricType = []ReportRankingMetricType{ ReportRankingMetricTypeBosscdps, ReportRankingMetricTypeBossdps, ReportRankingMetricTypeBossndps, ReportRankingMetricTypeBossrdps, ReportRankingMetricTypeDefault, ReportRankingMetricTypeDps, ReportRankingMetricTypeHps, ReportRankingMetricTypeKrsi, ReportRankingMetricTypePlayerscore, ReportRankingMetricTypePlayerspeed, ReportRankingMetricTypeCdps, ReportRankingMetricTypeNdps, ReportRankingMetricTypeRdps, ReportRankingMetricTypeTankhps, ReportRankingMetricTypeWdps, }
var AllRoleType = []RoleType{ RoleTypeAny, RoleTypeDPS, RoleTypeHealer, RoleTypeTank, }
var AllTableDataType = []TableDataType{ TableDataTypeSummary, TableDataTypeBuffs, TableDataTypeCasts, TableDataTypeDamageDone, TableDataTypeDamageTaken, TableDataTypeDeaths, TableDataTypeDebuffs, TableDataTypeDispels, TableDataTypeHealing, TableDataTypeInterrupts, TableDataTypeResources, TableDataTypeSummons, TableDataTypeSurvivability, TableDataTypeThreat, }
var AllViewType = []ViewType{ ViewTypeDefault, ViewTypeAbility, ViewTypeSource, ViewTypeTarget, }
var ErrBlocked = errors.New("warcraftlogs: blocked by CDN")
ErrBlocked reports that a response was served by the CDN in front of the API rather than the API itself. Match it with IsBlocked.
var ErrConflictingOptions = errors.New("warcraftlogs: WithHTTPClient supersedes other auth and transport options")
ErrConflictingOptions is returned by New when WithHTTPClient is combined with an option it would override.
var ErrNoCredentials = errors.New("warcraftlogs: no credentials configured (use WithClientCredentials, WithTokenSource, or WithHTTPClient)")
ErrNoCredentials is returned by New when no authentication is configured.
var ErrNotFound = errors.New("warcraftlogs: not found")
ErrNotFound is returned by single-entity lookups when the API resolves the query but no matching entity exists.
var ErrPageNotAdvancing = errors.New("warcraftlogs: pagination cursor did not advance")
ErrPageNotAdvancing is returned by Client.ReportEventsAll when the API hands back a next-page cursor that does not move forward.
Functions ¶
func HTTPStatus ¶
HTTPStatus returns the status code if err was caused by a non-2xx response, whether it came from the API or from the CDN in front of it.
func IsBlocked ¶
IsBlocked reports whether the request was rejected by the CDN in front of the API rather than reaching it. See CDNError.
func IsRateLimited ¶
IsRateLimited reports whether err was caused by an HTTP 429 response.
func IsUnauthorized ¶
IsUnauthorized reports whether err was caused by an HTTP 401 or 403 response. A CDN challenge is not an auth failure, so IsBlocked takes precedence.
func OAuthConfig ¶
OAuthConfig returns an oauth2.Config wired to the Warcraft Logs OAuth endpoints for the authorization-code and PKCE flows, used to access private data via UserEndpoint.
Authorization-code:
cfg := warcraftlogs.OAuthConfig(id, secret, redirect) url := cfg.AuthCodeURL(state) // redirect the user, then on the callback: tok, err := cfg.Exchange(ctx, code)
PKCE (no client secret):
cfg := warcraftlogs.OAuthConfig(id, "", redirect) verifier := oauth2.GenerateVerifier() url := cfg.AuthCodeURL(state, oauth2.S256ChallengeOption(verifier)) tok, err := cfg.Exchange(ctx, code, oauth2.VerifierOption(verifier))
In both cases build the client with the resulting token:
client, err := warcraftlogs.New(ctx, warcraftlogs.WithTokenSource(cfg.TokenSource(ctx, tok)), warcraftlogs.WithEndpoint(warcraftlogs.UserEndpoint))
Example ¶
package main
import (
"context"
"fmt"
"log"
warcraftlogs "github.com/math280h/go-wcl"
)
func main() {
ctx := context.Background()
cfg := warcraftlogs.OAuthConfig("client-id", "client-secret", "https://example.com/callback")
url := cfg.AuthCodeURL("state-token")
fmt.Println("visit:", url)
tok, err := cfg.Exchange(ctx, "code-from-callback")
if err != nil {
log.Fatal(err)
}
client, err := warcraftlogs.New(ctx,
warcraftlogs.WithTokenSource(cfg.TokenSource(ctx, tok)),
warcraftlogs.WithEndpoint(warcraftlogs.UserEndpoint))
if err != nil {
log.Fatal(err)
}
_ = client
}
Output:
Types ¶
type CDNError ¶
type CDNError struct {
StatusCode int
URL string
// Title is the <title> of the returned page, e.g. "Just a moment...". It is
// empty if the page had none.
Title string
}
CDNError is returned when the CDN answers with an HTML challenge or error page instead of a GraphQL response. It unwraps to ErrBlocked.
type Character ¶
type Character struct {
// The ID of the character.
Id int `json:"id"`
// The canonical ID of the character. If a character renames or transfers, then the canonical id can be used to identify the most recent version of the character.
CanonicalID int `json:"canonicalID"`
// The name of the character.
Name string `json:"name"`
// The class id of the character.
ClassID int `json:"classID"`
// The level of the character.
Level int `json:"level"`
// Whether or not the character has all its rankings hidden.
Hidden bool `json:"hidden"`
// The guild rank of the character in their primary guild. This is not the user rank on the site, but the rank according to the game data, e.g., a Warcraft guild rank or an FFXIV Free Company rank.
GuildRank int `json:"guildRank"`
// The faction of the character.
Faction Faction `json:"faction"`
// The server that the character belongs to.
Server Server `json:"server"`
}
Character includes the GraphQL fields of Character requested by the fragment Character. The GraphQL type's documentation follows.
A player character. Characters can earn individual rankings and appear in reports.
func (*Character) GetCanonicalID ¶
GetCanonicalID returns Character.CanonicalID, and is useful for accessing the field via an interface.
func (*Character) GetClassID ¶
GetClassID returns Character.ClassID, and is useful for accessing the field via an interface.
func (*Character) GetFaction ¶
GetFaction returns Character.Faction, and is useful for accessing the field via an interface.
func (*Character) GetGuildRank ¶
GetGuildRank returns Character.GuildRank, and is useful for accessing the field via an interface.
func (*Character) GetHidden ¶
GetHidden returns Character.Hidden, and is useful for accessing the field via an interface.
func (*Character) GetId ¶
GetId returns Character.Id, and is useful for accessing the field via an interface.
func (*Character) GetLevel ¶
GetLevel returns Character.Level, and is useful for accessing the field via an interface.
type CharacterPageRankingMetricType ¶
type CharacterPageRankingMetricType string
All character ranking metrics, plus combined metrics for points and damage/healing that are displayed on character pages.
const ( // Boss cDPS is unique to FFXIV and is damage done to the boss adjusted for raid-contributing buffs and debuffs. CharacterPageRankingMetricTypeBosscdps CharacterPageRankingMetricType = "bosscdps" // Boss damage per second. CharacterPageRankingMetricTypeBossdps CharacterPageRankingMetricType = "bossdps" // Boss nDPS is unique to FFXIV and is damage done to the boss adjusted for raid-contributing buffs and debuffs. CharacterPageRankingMetricTypeBossndps CharacterPageRankingMetricType = "bossndps" // Boss rDPS is unique to FFXIV and is damage done to the boss adjusted for raid-contributing buffs and debuffs. CharacterPageRankingMetricTypeBossrdps CharacterPageRankingMetricType = "bossrdps" // Choose an appropriate default depending on the other selected parameters. CharacterPageRankingMetricTypeDefault CharacterPageRankingMetricType = "default" // Damage per second. CharacterPageRankingMetricTypeDps CharacterPageRankingMetricType = "dps" // Healing per second. CharacterPageRankingMetricTypeHps CharacterPageRankingMetricType = "hps" // Survivability ranking for tanks. Deprecated. Only supported for some older WoW zones. CharacterPageRankingMetricTypeKrsi CharacterPageRankingMetricType = "krsi" // Score. Used by WoW Mythic dungeons and by ESO trials. CharacterPageRankingMetricTypePlayerscore CharacterPageRankingMetricType = "playerscore" // Speed. Not supported by every zone. CharacterPageRankingMetricTypePlayerspeed CharacterPageRankingMetricType = "playerspeed" // cDPS is unique to FFXIV and is damage done adjusted for raid-contributing buffs and debuffs. CharacterPageRankingMetricTypeCdps CharacterPageRankingMetricType = "cdps" // nDPS is unique to FFXIV and is damage done adjusted for raid-contributing buffs and debuffs. CharacterPageRankingMetricTypeNdps CharacterPageRankingMetricType = "ndps" // rDPS is unique to FFXIV and is damage done adjusted for raid-contributing buffs and debuffs. CharacterPageRankingMetricTypeRdps CharacterPageRankingMetricType = "rdps" // Healing done per second to tanks. CharacterPageRankingMetricTypeTankhps CharacterPageRankingMetricType = "tankhps" // Weighted damage per second. Unique to WoW currently. Used to remove pad damage and reward damage done to high priority targets. CharacterPageRankingMetricTypeWdps CharacterPageRankingMetricType = "wdps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterPageRankingMetricTypeHealercombineddps CharacterPageRankingMetricType = "healercombineddps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterPageRankingMetricTypeHealercombinedbossdps CharacterPageRankingMetricType = "healercombinedbossdps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterPageRankingMetricTypeHealercombinedcdps CharacterPageRankingMetricType = "healercombinedcdps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterPageRankingMetricTypeHealercombinedbosscdps CharacterPageRankingMetricType = "healercombinedbosscdps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterPageRankingMetricTypeHealercombinedndps CharacterPageRankingMetricType = "healercombinedndps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterPageRankingMetricTypeHealercombinedbossndps CharacterPageRankingMetricType = "healercombinedbossndps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterPageRankingMetricTypeHealercombinedrdps CharacterPageRankingMetricType = "healercombinedrdps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterPageRankingMetricTypeHealercombinedbossrdps CharacterPageRankingMetricType = "healercombinedbossrdps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterPageRankingMetricTypeTankcombineddps CharacterPageRankingMetricType = "tankcombineddps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterPageRankingMetricTypeTankcombinedbossdps CharacterPageRankingMetricType = "tankcombinedbossdps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterPageRankingMetricTypeTankcombinedcdps CharacterPageRankingMetricType = "tankcombinedcdps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterPageRankingMetricTypeTankcombinedbosscdps CharacterPageRankingMetricType = "tankcombinedbosscdps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterPageRankingMetricTypeTankcombinedndps CharacterPageRankingMetricType = "tankcombinedndps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterPageRankingMetricTypeTankcombinedbossndps CharacterPageRankingMetricType = "tankcombinedbossndps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterPageRankingMetricTypeTankcombinedrdps CharacterPageRankingMetricType = "tankcombinedrdps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterPageRankingMetricTypeTankcombinedbossrdps CharacterPageRankingMetricType = "tankcombinedbossrdps" // Combined score and damage. Used by WoW Mythic+ and Fellowship. Returns score rankings plus an additional throughputRankings field with damage data filtered by key and item level. CharacterPageRankingMetricTypePointsAndDamage CharacterPageRankingMetricType = "points_and_damage" // Combined score and healing. Used by WoW Mythic+ and Fellowship. Returns score rankings plus an additional throughputRankings field with healing data filtered by key and item level. CharacterPageRankingMetricTypePointsAndHealing CharacterPageRankingMetricType = "points_and_healing" )
type CharacterRankingMetricType ¶
type CharacterRankingMetricType string
All the possible metrics.
const ( // Boss cDPS is unique to FFXIV and is damage done to the boss adjusted for raid-contributing buffs and debuffs. CharacterRankingMetricTypeBosscdps CharacterRankingMetricType = "bosscdps" // Boss damage per second. CharacterRankingMetricTypeBossdps CharacterRankingMetricType = "bossdps" // Boss nDPS is unique to FFXIV and is damage done to the boss adjusted for raid-contributing buffs and debuffs. CharacterRankingMetricTypeBossndps CharacterRankingMetricType = "bossndps" // Boss rDPS is unique to FFXIV and is damage done to the boss adjusted for raid-contributing buffs and debuffs. CharacterRankingMetricTypeBossrdps CharacterRankingMetricType = "bossrdps" // Choose an appropriate default depending on the other selected parameters. CharacterRankingMetricTypeDefault CharacterRankingMetricType = "default" // Damage per second. CharacterRankingMetricTypeDps CharacterRankingMetricType = "dps" // Healing per second. CharacterRankingMetricTypeHps CharacterRankingMetricType = "hps" // Survivability ranking for tanks. Deprecated. Only supported for some older WoW zones. CharacterRankingMetricTypeKrsi CharacterRankingMetricType = "krsi" // Score. Used by WoW Mythic dungeons and by ESO trials. CharacterRankingMetricTypePlayerscore CharacterRankingMetricType = "playerscore" // Speed. Not supported by every zone. CharacterRankingMetricTypePlayerspeed CharacterRankingMetricType = "playerspeed" // cDPS is unique to FFXIV and is damage done adjusted for raid-contributing buffs and debuffs. CharacterRankingMetricTypeCdps CharacterRankingMetricType = "cdps" // nDPS is unique to FFXIV and is damage done adjusted for raid-contributing buffs and debuffs. CharacterRankingMetricTypeNdps CharacterRankingMetricType = "ndps" // rDPS is unique to FFXIV and is damage done adjusted for raid-contributing buffs and debuffs. CharacterRankingMetricTypeRdps CharacterRankingMetricType = "rdps" // Healing done per second to tanks. CharacterRankingMetricTypeTankhps CharacterRankingMetricType = "tankhps" // Weighted damage per second. Unique to WoW currently. Used to remove pad damage and reward damage done to high priority targets. CharacterRankingMetricTypeWdps CharacterRankingMetricType = "wdps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterRankingMetricTypeHealercombineddps CharacterRankingMetricType = "healercombineddps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterRankingMetricTypeHealercombinedbossdps CharacterRankingMetricType = "healercombinedbossdps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterRankingMetricTypeHealercombinedcdps CharacterRankingMetricType = "healercombinedcdps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterRankingMetricTypeHealercombinedbosscdps CharacterRankingMetricType = "healercombinedbosscdps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterRankingMetricTypeHealercombinedndps CharacterRankingMetricType = "healercombinedndps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterRankingMetricTypeHealercombinedbossndps CharacterRankingMetricType = "healercombinedbossndps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterRankingMetricTypeHealercombinedrdps CharacterRankingMetricType = "healercombinedrdps" // Unique to FFXIV. Represents the combined ranking for a pair of healers in eight player content. CharacterRankingMetricTypeHealercombinedbossrdps CharacterRankingMetricType = "healercombinedbossrdps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterRankingMetricTypeTankcombineddps CharacterRankingMetricType = "tankcombineddps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterRankingMetricTypeTankcombinedbossdps CharacterRankingMetricType = "tankcombinedbossdps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterRankingMetricTypeTankcombinedcdps CharacterRankingMetricType = "tankcombinedcdps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterRankingMetricTypeTankcombinedbosscdps CharacterRankingMetricType = "tankcombinedbosscdps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterRankingMetricTypeTankcombinedndps CharacterRankingMetricType = "tankcombinedndps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterRankingMetricTypeTankcombinedbossndps CharacterRankingMetricType = "tankcombinedbossndps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterRankingMetricTypeTankcombinedrdps CharacterRankingMetricType = "tankcombinedrdps" // Unique to FFXIV. Represents the combined ranking for a pair of tanks in eight player content. CharacterRankingMetricTypeTankcombinedbossrdps CharacterRankingMetricType = "tankcombinedbossrdps" )
type CharacterRef ¶
CharacterRef identifies a character by ID, or by name plus server slug and region (e.g. "us", "eu"). Populate one form or the other.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Warcraft Logs API client. It is safe for concurrent use.
func New ¶
New creates a Client. Provide authentication with WithClientCredentials, WithTokenSource, or WithHTTPClient. Canceling ctx does not affect the returned Client.
Example ¶
package main
import (
"context"
"log"
warcraftlogs "github.com/math280h/go-wcl"
)
func main() {
ctx := context.Background()
client, err := warcraftlogs.New(ctx,
warcraftlogs.WithClientCredentials("client-id", "client-secret"))
if err != nil {
log.Fatal(err)
}
_ = client
}
Output:
func (*Client) Ability ¶
Ability looks up a game ability by its ID. It returns ErrNotFound if no ability matches.
func (*Client) Character ¶
Character looks up a character by its canonical ID. It returns ErrNotFound if no character matches.
func (*Client) CharacterByName ¶
func (c *Client) CharacterByName(ctx context.Context, name, serverSlug, serverRegion string) (*Character, error)
CharacterByName looks up a character by name, server slug, and server region (e.g. "us", "eu"). It returns ErrNotFound if no character matches.
func (*Client) CharacterEncounterRankings ¶
func (c *Client) CharacterEncounterRankings(ctx context.Context, p EncounterRankingsParams) (json.RawMessage, error)
CharacterEncounterRankings returns a character's ranked performance for a single encounter as raw JSON. It returns ErrNotFound if no character matches.
func (*Client) CharacterZoneRankings ¶
func (c *Client) CharacterZoneRankings(ctx context.Context, p ZoneRankingsParams) (json.RawMessage, error)
CharacterZoneRankings returns a character's ranked performance across a zone as raw JSON. It returns ErrNotFound if no character matches.
func (*Client) Classes ¶
Classes returns the playable classes, optionally filtered by faction and zone. A zero filter is omitted.
func (*Client) CurrentUser ¶
func (c *Client) CurrentUser(ctx context.Context) (*CurrentUser, error)
CurrentUser returns the authenticated user. It requires UserEndpoint and a token from the authorization-code or PKCE flow, and returns ErrNotFound otherwise.
func (*Client) Encounter ¶
Encounter looks up an encounter by its ID. It returns ErrNotFound if no encounter matches.
func (*Client) EncounterLeaderboard ¶
func (c *Client) EncounterLeaderboard(ctx context.Context, p EncounterLeaderboardParams) (json.RawMessage, error)
EncounterLeaderboard returns an encounter's top-ranked characters as raw JSON. This is the inverse of Client.CharacterEncounterRankings, which ranks one named character. It returns ErrNotFound if no encounter matches.
func (*Client) Execute ¶
func (c *Client) Execute(ctx context.Context, query string, variables map[string]any, out any) error
Execute runs a GraphQL query and decodes the "data" field of the response into out, which must be a pointer. Use it for operations not covered by the generated methods.
Example ¶
package main
import (
"context"
"fmt"
"log"
warcraftlogs "github.com/math280h/go-wcl"
)
func main() {
ctx := context.Background()
client, err := warcraftlogs.New(ctx,
warcraftlogs.WithClientCredentials("client-id", "client-secret"))
if err != nil {
log.Fatal(err)
}
var resp struct {
WorldData struct {
Zones []struct {
ID int `json:"id"`
Name string `json:"name"`
} `json:"zones"`
} `json:"worldData"`
}
if err := client.Execute(ctx, `query { worldData { zones { id name } } }`, nil, &resp); err != nil {
log.Fatal(err)
}
for _, z := range resp.WorldData.Zones {
fmt.Println(z.ID, z.Name)
}
}
Output:
func (*Client) Expansion ¶
Expansion looks up an expansion by its ID. It returns ErrNotFound if no expansion matches.
func (*Client) Expansions ¶
Expansions returns all expansions.
func (*Client) GraphQL ¶
GraphQL returns the underlying genqlient client for use with generated operations or custom tooling.
func (*Client) Guild ¶
Guild looks up a guild by its ID. It returns ErrNotFound if no guild matches.
func (*Client) GuildByName ¶
func (c *Client) GuildByName(ctx context.Context, name, serverSlug, serverRegion string) (*Guild, error)
GuildByName looks up a guild by name, server slug, and server region (e.g. "us", "eu"). It returns ErrNotFound if no guild matches.
func (*Client) Item ¶
Item looks up a game item by its ID. It returns ErrNotFound if no item matches.
func (*Client) NPC ¶
NPC looks up a game NPC by its ID. It returns ErrNotFound if no NPC matches.
func (*Client) RateLimit ¶
RateLimit returns the API point budget for the authenticated key. The budget resets on a rolling one-hour window; costs scale with the amount of data a query requests.
Example ¶
package main
import (
"context"
"fmt"
"log"
warcraftlogs "github.com/math280h/go-wcl"
)
func main() {
ctx := context.Background()
client, err := warcraftlogs.New(ctx,
warcraftlogs.WithClientCredentials("client-id", "client-secret"))
if err != nil {
log.Fatal(err)
}
limit, err := client.RateLimit(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%.1f / %d points used\n", limit.PointsSpentThisHour, limit.LimitPerHour)
}
Output:
func (*Client) Report ¶
Report looks up a report by its code. It returns ErrNotFound if no report matches. Set allowUnlisted to access unlisted reports the authenticated key may view.
func (*Client) ReportActors ¶
func (c *Client) ReportActors(ctx context.Context, p ReportActorsParams) ([]ReportActor, error)
ReportActors returns a report's actors, filtered by type and sub-type. It is the narrow form of Client.ReportMasterData, which always returns every actor alongside the full ability table. It returns ErrNotFound if no report matches.
func (*Client) ReportEvents ¶
func (c *Client) ReportEvents(ctx context.Context, dataType EventDataType, p ReportEventsParams) (EventPage, error)
ReportEvents returns a page of report events as raw JSON. It returns ErrNotFound if no report matches.
func (*Client) ReportEventsAll ¶
func (c *Client) ReportEventsAll(ctx context.Context, dataType EventDataType, p ReportEventsParams) iter.Seq2[json.RawMessage, error]
ReportEventsAll iterates every event matching p, following EventPage.NextPageTimestamp across pages and yielding one event at a time. Events arrive as raw JSON objects for the caller to decode.
Iteration stops at the first error, which is yielded with a nil event. Stop early by breaking out of the range loop; no further requests are made.
for e, err := range client.ReportEventsAll(ctx, dataType, params) {
if err != nil {
return err
}
// ... decode e ...
}
Like Client.ReportEvents, this requires either FightIDs or an explicit StartTime and EndTime range. It does not modify p.
func (*Client) ReportGraph ¶
func (c *Client) ReportGraph(ctx context.Context, dataType GraphDataType, p ReportAnalysisParams) (json.RawMessage, error)
ReportGraph returns report graph data as raw JSON. It returns ErrNotFound if no report matches.
func (*Client) ReportMasterData ¶
func (c *Client) ReportMasterData(ctx context.Context, code string, translate bool) (ReportMasterData, error)
ReportMasterData returns the actors and abilities referenced by a report. Set translate to localize names to the request locale. It returns ErrNotFound if no report matches.
func (*Client) ReportPlayerDetails ¶
func (c *Client) ReportPlayerDetails(ctx context.Context, p PlayerDetailsParams) (json.RawMessage, error)
ReportPlayerDetails returns per-player detail for a report as raw JSON. It returns ErrNotFound if no report matches.
func (*Client) ReportRankings ¶
func (c *Client) ReportRankings(ctx context.Context, p ReportRankingsParams) (json.RawMessage, error)
ReportRankings returns a report's rankings as raw JSON. It returns ErrNotFound if no report matches.
func (*Client) ReportTable ¶
func (c *Client) ReportTable(ctx context.Context, dataType TableDataType, p ReportAnalysisParams) (json.RawMessage, error)
ReportTable returns a report analysis table as raw JSON. It returns ErrNotFound if no report matches.
func (*Client) ReportWithFights ¶
func (c *Client) ReportWithFights(ctx context.Context, p ReportWithFightsParams) (*ReportWithFights, error)
ReportWithFights returns a report's header, fights and encounter phases in a single request. Use Client.Report when the header is all you need. It returns ErrNotFound if no report matches.
func (*Client) Reports ¶
func (c *Client) Reports(ctx context.Context, p ReportsParams) (ReportPage, error)
Reports lists uploaded reports for a guild or user. Advance through the result by incrementing Page while ReportPage.HasMorePages is true. Limit defaults to 100, which is also the maximum.
func (*Client) Server ¶
Server looks up a server by its ID. It returns ErrNotFound if no server matches.
func (*Client) ServerBySlug ¶
ServerBySlug looks up a server by its region abbreviation (e.g. "US") and slug. It returns ErrNotFound if no server matches.
func (*Client) User ¶
User looks up a user by ID. It returns ErrNotFound if no user matches. Avatar and battle tag are only readable through Client.CurrentUser.
func (*Client) Zone ¶
Zone looks up a zone by its ID. It returns ErrNotFound if no zone matches.
type CurrentUser ¶
type CurrentUser struct {
// The ID of the user.
Id int `json:"id"`
// The name of the user.
Name string `json:"name"`
// The avatar of the user, typically the main character avatar.
Avatar string `json:"avatar"`
// The battle tag of the user if they have linked it.
BattleTag string `json:"battleTag"`
}
CurrentUser includes the GraphQL fields of User requested by the fragment CurrentUser. The GraphQL type's documentation follows.
A single user of the site. Most fields can only be accessed when authenticated as that user with the "view-user-profile" scope.
func (*CurrentUser) GetAvatar ¶
func (v *CurrentUser) GetAvatar() string
GetAvatar returns CurrentUser.Avatar, and is useful for accessing the field via an interface.
func (*CurrentUser) GetBattleTag ¶
func (v *CurrentUser) GetBattleTag() string
GetBattleTag returns CurrentUser.BattleTag, and is useful for accessing the field via an interface.
func (*CurrentUser) GetId ¶
func (v *CurrentUser) GetId() int
GetId returns CurrentUser.Id, and is useful for accessing the field via an interface.
func (*CurrentUser) GetName ¶
func (v *CurrentUser) GetName() string
GetName returns CurrentUser.Name, and is useful for accessing the field via an interface.
type Encounter ¶
type Encounter struct {
// The ID of the encounter.
Id int `json:"id"`
// The localized name of the encounter.
Name string `json:"name"`
// The Blizzard journal ID, used as the identifier in the encounter journal and various Blizzard APIs like progression.
JournalID int `json:"journalID"`
// The zone that this encounter is found in.
Zone ZoneSummary `json:"zone"`
}
Encounter includes the GraphQL fields of Encounter requested by the fragment Encounter. The GraphQL type's documentation follows.
A single encounter for the game.
func (*Encounter) GetId ¶
GetId returns Encounter.Id, and is useful for accessing the field via an interface.
func (*Encounter) GetJournalID ¶
GetJournalID returns Encounter.JournalID, and is useful for accessing the field via an interface.
func (*Encounter) GetName ¶
GetName returns Encounter.Name, and is useful for accessing the field via an interface.
func (*Encounter) GetZone ¶
func (v *Encounter) GetZone() ZoneSummary
GetZone returns Encounter.Zone, and is useful for accessing the field via an interface.
type EncounterLeaderboardParams ¶
type EncounterLeaderboardParams struct {
EncounterID int
Difficulty int
ClassName string
SpecName string
Metric CharacterRankingMetricType
Page int
Partition int
Bracket int
Size int
ServerRegion string
ServerSlug string
Filter string
IncludeCombatantInfo bool
}
EncounterLeaderboardParams selects the leaderboard returned by Client.EncounterLeaderboard. EncounterID is required; other zero fields are omitted.
type EncounterPhases ¶
type EncounterPhases struct {
EncounterID int `json:"encounterID"`
// Whether the phases can be used to separate wipes in the report UI.
SeparatesWipes *bool `json:"separatesWipes"`
// Phase metadata for all phases in this encounter.
Phases []PhaseMetadata `json:"phases"`
}
EncounterPhases includes the GraphQL fields of EncounterPhases requested by the fragment EncounterPhases.
func (*EncounterPhases) GetEncounterID ¶
func (v *EncounterPhases) GetEncounterID() int
GetEncounterID returns EncounterPhases.EncounterID, and is useful for accessing the field via an interface.
func (*EncounterPhases) GetPhases ¶
func (v *EncounterPhases) GetPhases() []PhaseMetadata
GetPhases returns EncounterPhases.Phases, and is useful for accessing the field via an interface.
func (*EncounterPhases) GetSeparatesWipes ¶
func (v *EncounterPhases) GetSeparatesWipes() *bool
GetSeparatesWipes returns EncounterPhases.SeparatesWipes, and is useful for accessing the field via an interface.
type EncounterRankingsParams ¶
type EncounterRankingsParams struct {
Character CharacterRef
EncounterID int
Metric CharacterRankingMetricType
Difficulty int
Partition int
Role RoleType
Size int
ClassName string
SpecName string
ByBracket bool
Timeframe RankingTimeframeType
Compare RankingCompareType
IncludeCombatantInfo bool
}
EncounterRankingsParams filters character encounter rankings. Zero fields are omitted.
type EventDataType ¶
type EventDataType string
The type of events or tables to examine.
const ( // All Events EventDataTypeAll EventDataType = "All" // Buffs. EventDataTypeBuffs EventDataType = "Buffs" // Casts. EventDataTypeCasts EventDataType = "Casts" // Combatant info events (includes gear). EventDataTypeCombatantInfo EventDataType = "CombatantInfo" // Damage done. EventDataTypeDamageDone EventDataType = "DamageDone" // Damage taken. EventDataTypeDamageTaken EventDataType = "DamageTaken" // Deaths. EventDataTypeDeaths EventDataType = "Deaths" // Debuffs. EventDataTypeDebuffs EventDataType = "Debuffs" // Dispels. EventDataTypeDispels EventDataType = "Dispels" // Healing done. EventDataTypeHealing EventDataType = "Healing" // Interrupts. EventDataTypeInterrupts EventDataType = "Interrupts" // Resources. EventDataTypeResources EventDataType = "Resources" // Summons EventDataTypeSummons EventDataType = "Summons" // Threat. EventDataTypeThreat EventDataType = "Threat" )
type EventPage ¶
type EventPage struct {
Data json.RawMessage
NextPageTimestamp float64
}
EventPage is one page of report events. NextPageTimestamp is zero when there are no further pages; otherwise pass it as StartTime to fetch the next page.
type Expansion ¶
type Expansion struct {
// The ID of the expansion.
Id int `json:"id"`
// The localized name of the expansion.
Name string `json:"name"`
// The zones (e.g., raids and dungeons) supported for this expansion.
Zones []ExpansionZonesZone `json:"zones"`
}
Expansion includes the GraphQL fields of Expansion requested by the fragment Expansion. The GraphQL type's documentation follows.
A single expansion for the game.
func (*Expansion) GetId ¶
GetId returns Expansion.Id, and is useful for accessing the field via an interface.
func (*Expansion) GetName ¶
GetName returns Expansion.Name, and is useful for accessing the field via an interface.
func (*Expansion) GetZones ¶
func (v *Expansion) GetZones() []ExpansionZonesZone
GetZones returns Expansion.Zones, and is useful for accessing the field via an interface.
type ExpansionSummary ¶
type ExpansionSummary struct {
// The ID of the expansion.
Id int `json:"id"`
// The localized name of the expansion.
Name string `json:"name"`
}
ExpansionSummary includes the GraphQL fields of Expansion requested by the fragment ExpansionSummary. The GraphQL type's documentation follows.
A single expansion for the game.
func (*ExpansionSummary) GetId ¶
func (v *ExpansionSummary) GetId() int
GetId returns ExpansionSummary.Id, and is useful for accessing the field via an interface.
func (*ExpansionSummary) GetName ¶
func (v *ExpansionSummary) GetName() string
GetName returns ExpansionSummary.Name, and is useful for accessing the field via an interface.
type ExpansionZonesZone ¶
type ExpansionZonesZone struct {
// The ID of the zone.
Id int `json:"id"`
// The name of the zone.
Name string `json:"name"`
}
ExpansionZonesZone includes the requested fields of the GraphQL type Zone. The GraphQL type's documentation follows.
A single zone from an expansion that represents a raid, dungeon, arena, etc.
func (*ExpansionZonesZone) GetId ¶
func (v *ExpansionZonesZone) GetId() int
GetId returns ExpansionZonesZone.Id, and is useful for accessing the field via an interface.
func (*ExpansionZonesZone) GetName ¶
func (v *ExpansionZonesZone) GetName() string
GetName returns ExpansionZonesZone.Name, and is useful for accessing the field via an interface.
type Faction ¶
type Faction struct {
// An integer representing the faction id.
Id int `json:"id"`
// The localized name of the faction.
Name string `json:"name"`
}
Faction includes the GraphQL fields of GameFaction requested by the fragment Faction. The GraphQL type's documentation follows.
A faction that a player or guild can belong to. Factions have an integer id used to identify them throughout the API and a localized name describing the faction.
type GameAbility ¶
type GameAbility struct {
// The ID of the ability.
Id int `json:"id"`
// The icon for the ability.
Icon string `json:"icon"`
// The localized name of the ability. Will be null if no localization information exists for the ability.
Name string `json:"name"`
}
GameAbility includes the GraphQL fields of GameAbility requested by the fragment GameAbility. The GraphQL type's documentation follows.
A single ability for the game.
func (*GameAbility) GetIcon ¶
func (v *GameAbility) GetIcon() string
GetIcon returns GameAbility.Icon, and is useful for accessing the field via an interface.
func (*GameAbility) GetId ¶
func (v *GameAbility) GetId() int
GetId returns GameAbility.Id, and is useful for accessing the field via an interface.
func (*GameAbility) GetName ¶
func (v *GameAbility) GetName() string
GetName returns GameAbility.Name, and is useful for accessing the field via an interface.
type GameClass ¶
type GameClass struct {
// An integer used to identify the class.
Id int `json:"id"`
// The localized name of the class.
Name string `json:"name"`
// A slug used to identify the class.
Slug string `json:"slug"`
// The specs supported by the class.
Specs []GameClassSpecsGameSpec `json:"specs"`
}
GameClass includes the GraphQL fields of GameClass requested by the fragment GameClass. The GraphQL type's documentation follows.
A single player class for the game.
func (*GameClass) GetId ¶
GetId returns GameClass.Id, and is useful for accessing the field via an interface.
func (*GameClass) GetName ¶
GetName returns GameClass.Name, and is useful for accessing the field via an interface.
func (*GameClass) GetSlug ¶
GetSlug returns GameClass.Slug, and is useful for accessing the field via an interface.
func (*GameClass) GetSpecs ¶
func (v *GameClass) GetSpecs() []GameClassSpecsGameSpec
GetSpecs returns GameClass.Specs, and is useful for accessing the field via an interface.
type GameClassSpecsGameSpec ¶
type GameClassSpecsGameSpec struct {
// An integer used to identify the spec.
Id int `json:"id"`
// The localized name of the class.
Name string `json:"name"`
// A slug used to identify the spec.
Slug string `json:"slug"`
}
GameClassSpecsGameSpec includes the requested fields of the GraphQL type GameSpec. The GraphQL type's documentation follows.
A spec for a given player class.
func (*GameClassSpecsGameSpec) GetId ¶
func (v *GameClassSpecsGameSpec) GetId() int
GetId returns GameClassSpecsGameSpec.Id, and is useful for accessing the field via an interface.
func (*GameClassSpecsGameSpec) GetName ¶
func (v *GameClassSpecsGameSpec) GetName() string
GetName returns GameClassSpecsGameSpec.Name, and is useful for accessing the field via an interface.
func (*GameClassSpecsGameSpec) GetSlug ¶
func (v *GameClassSpecsGameSpec) GetSlug() string
GetSlug returns GameClassSpecsGameSpec.Slug, and is useful for accessing the field via an interface.
type GameItem ¶
type GameItem struct {
// The ID of the item.
Id int `json:"id"`
// The icon for the item.
Icon string `json:"icon"`
// The localized name of the item. Will be null if no localization information exists for the item.
Name string `json:"name"`
}
GameItem includes the GraphQL fields of GameItem requested by the fragment GameItem. The GraphQL type's documentation follows.
A single item for the game.
func (*GameItem) GetIcon ¶
GetIcon returns GameItem.Icon, and is useful for accessing the field via an interface.
type GameNPC ¶
type GameNPC struct {
// The ID of the NPC.
Id int `json:"id"`
// The localized name of the NPC. Will be null if no localization information exists for the NPC.
Name string `json:"name"`
}
GameNPC includes the GraphQL fields of GameNPC requested by the fragment GameNPC. The GraphQL type's documentation follows.
A single NPC for the game.
type GameZoneSummary ¶
type GameZoneSummary struct {
// The ID of the zone.
Id float64 `json:"id"`
// The localized name of the zone. Will be null if no localization information exists for the zone.
Name string `json:"name"`
}
GameZoneSummary includes the GraphQL fields of GameZone requested by the fragment GameZoneSummary. The GraphQL type's documentation follows.
A single zone for the game.
func (*GameZoneSummary) GetId ¶
func (v *GameZoneSummary) GetId() float64
GetId returns GameZoneSummary.Id, and is useful for accessing the field via an interface.
func (*GameZoneSummary) GetName ¶
func (v *GameZoneSummary) GetName() string
GetName returns GameZoneSummary.Name, and is useful for accessing the field via an interface.
type GraphDataType ¶
type GraphDataType string
The type of graph to examine.
const ( // Summary Overview GraphDataTypeSummary GraphDataType = "Summary" // Buffs. GraphDataTypeBuffs GraphDataType = "Buffs" // Casts. GraphDataTypeCasts GraphDataType = "Casts" // Damage done. GraphDataTypeDamageDone GraphDataType = "DamageDone" // Damage taken. GraphDataTypeDamageTaken GraphDataType = "DamageTaken" // Deaths. GraphDataTypeDeaths GraphDataType = "Deaths" // Debuffs. GraphDataTypeDebuffs GraphDataType = "Debuffs" // Dispels. GraphDataTypeDispels GraphDataType = "Dispels" // Healing done. GraphDataTypeHealing GraphDataType = "Healing" // Interrupts. GraphDataTypeInterrupts GraphDataType = "Interrupts" // Resources. GraphDataTypeResources GraphDataType = "Resources" // Summons GraphDataTypeSummons GraphDataType = "Summons" // Survivability (death info across multiple pulls). GraphDataTypeSurvivability GraphDataType = "Survivability" // Threat. GraphDataTypeThreat GraphDataType = "Threat" )
type GraphQLError ¶
type GraphQLError struct {
Message string
// Path is the dotted response path the error applies to, such as
// "reportData.report", with list elements as "[0]". It is empty when the
// error is not tied to a field.
Path string
Locations []Location
Extensions map[string]any
}
GraphQLError is a single error entry from a GraphQL response.
func GraphQLErrors ¶
func GraphQLErrors(err error) []GraphQLError
GraphQLErrors returns the GraphQL-level errors carried by err, or nil if err is not one. A response may contain both partial data and errors.
func (GraphQLError) Error ¶
func (e GraphQLError) Error() string
type Guild ¶
type Guild struct {
// The ID of the guild.
Id int `json:"id"`
// The name of the guild.
Name string `json:"name"`
// The description for the guild that is displayed with the guild name on the site.
Description string `json:"description"`
// Whether or not the guild has competition mode enabled.
CompetitionMode bool `json:"competitionMode"`
// Whether or not the guild has stealth mode enabled.
StealthMode bool `json:"stealthMode"`
// The type of the guild. A value of 0 indicates a guild. A value of 1 indicates a raid/mythic+ team.
Type int `json:"type"`
// The faction of the guild.
Faction Faction `json:"faction"`
// The server that the guild belongs to.
Server Server `json:"server"`
}
Guild includes the GraphQL fields of Guild requested by the fragment Guild. The GraphQL type's documentation follows.
A single guild. Guilds earn their own rankings and contain characters. They may correspond to a guild in-game or be a custom guild created just to hold reports and rankings.
func (*Guild) GetCompetitionMode ¶
GetCompetitionMode returns Guild.CompetitionMode, and is useful for accessing the field via an interface.
func (*Guild) GetDescription ¶
GetDescription returns Guild.Description, and is useful for accessing the field via an interface.
func (*Guild) GetFaction ¶
GetFaction returns Guild.Faction, and is useful for accessing the field via an interface.
func (*Guild) GetId ¶
GetId returns Guild.Id, and is useful for accessing the field via an interface.
func (*Guild) GetName ¶
GetName returns Guild.Name, and is useful for accessing the field via an interface.
func (*Guild) GetServer ¶
GetServer returns Guild.Server, and is useful for accessing the field via an interface.
func (*Guild) GetStealthMode ¶
GetStealthMode returns Guild.StealthMode, and is useful for accessing the field via an interface.
type GuildSummary ¶
type GuildSummary struct {
// The ID of the guild.
Id int `json:"id"`
// The name of the guild.
Name string `json:"name"`
}
GuildSummary includes the GraphQL fields of Guild requested by the fragment GuildSummary. The GraphQL type's documentation follows.
A single guild. Guilds earn their own rankings and contain characters. They may correspond to a guild in-game or be a custom guild created just to hold reports and rankings.
func (*GuildSummary) GetId ¶
func (v *GuildSummary) GetId() int
GetId returns GuildSummary.Id, and is useful for accessing the field via an interface.
func (*GuildSummary) GetName ¶
func (v *GuildSummary) GetName() string
GetName returns GuildSummary.Name, and is useful for accessing the field via an interface.
type HostilityType ¶
type HostilityType string
Whether or not to fetch information for friendlies or enemies.
const ( // Fetch information for friendlies. HostilityTypeFriendlies HostilityType = "Friendlies" // Fetch information for enemies. HostilityTypeEnemies HostilityType = "Enemies" )
type KillType ¶
type KillType string
A filter for kills vs wipes and encounters vs trash.
const ( // Include trash and encounters. KillTypeAll KillType = "All" // Only include encounters (kills and wipes). KillTypeEncounters KillType = "Encounters" // Only include encounters that end in a kill. KillTypeKills KillType = "Kills" // Only include trash. KillTypeTrash KillType = "Trash" // Only include encounters that end in a wipe. KillTypeWipes KillType = "Wipes" )
type Option ¶
type Option func(*options)
Option configures a Client.
func WithBaseTransport ¶
func WithBaseTransport(rt http.RoundTripper) Option
WithBaseTransport sets the http.RoundTripper beneath the retry and auth layers. Defaults to http.DefaultTransport.
func WithClientCredentials ¶
WithClientCredentials authenticates using the OAuth 2.0 client-credentials flow against ClientEndpoint.
func WithEndpoint ¶
WithEndpoint overrides the GraphQL endpoint, e.g. UserEndpoint or a region-specific host.
func WithHTTPClient ¶
WithHTTPClient uses a fully preconfigured HTTP client verbatim, including its authentication transport. It supersedes every other auth and transport option, so combining it with one returns ErrConflictingOptions rather than dropping it. WithEndpoint still applies.
func WithLogger ¶
WithLogger logs retried requests at debug level to l. Request headers are never logged. Nothing is logged by default.
func WithMaxRetries ¶
WithMaxRetries sets how many times a retryable request (HTTP 429 or 5xx) is retried with exponential backoff. Zero disables retries.
func WithScopes ¶
WithScopes sets the OAuth scopes requested by the client-credentials flow.
func WithTimeout ¶
WithTimeout sets the per-request timeout of the underlying HTTP client.
func WithTokenSource ¶
func WithTokenSource(ts oauth2.TokenSource) Option
WithTokenSource authenticates using a caller-provided token source, such as one obtained from the authorization-code or PKCE flow (see OAuthConfig). Pair it with WithEndpoint(UserEndpoint) to access private data.
func WithTokenURL ¶
WithTokenURL overrides the OAuth 2.0 token endpoint used by WithClientCredentials. Defaults to TokenURL.
func WithUserAgent ¶
WithUserAgent sets the User-Agent header sent with every request.
type PhaseMetadata ¶
type PhaseMetadata struct {
// Phase ID. 1-indexed
Id int `json:"id"`
Name string `json:"name"`
// Whether this phase represents an intermission.
IsIntermission *bool `json:"isIntermission"`
}
PhaseMetadata includes the GraphQL fields of PhaseMetadata requested by the fragment PhaseMetadata. The GraphQL type's documentation follows.
Information about a phase from a boss encounter.
func (*PhaseMetadata) GetId ¶
func (v *PhaseMetadata) GetId() int
GetId returns PhaseMetadata.Id, and is useful for accessing the field via an interface.
func (*PhaseMetadata) GetIsIntermission ¶
func (v *PhaseMetadata) GetIsIntermission() *bool
GetIsIntermission returns PhaseMetadata.IsIntermission, and is useful for accessing the field via an interface.
func (*PhaseMetadata) GetName ¶
func (v *PhaseMetadata) GetName() string
GetName returns PhaseMetadata.Name, and is useful for accessing the field via an interface.
type PhaseTransition ¶
type PhaseTransition struct {
// The 1-indexed id of the phase. Phase IDs are absolute within a fight: phases with the same ID correspond to the same semantic phase.
Id int `json:"id"`
// The report-relative timestamp of the transition into the phase. The phase ends at the beginning of the next phase, or at the end of the fight.
StartTime float64 `json:"startTime"`
}
PhaseTransition includes the GraphQL fields of PhaseTransition requested by the fragment PhaseTransition. The GraphQL type's documentation follows.
A spartan representation of phase transitions during a fight.
func (*PhaseTransition) GetId ¶
func (v *PhaseTransition) GetId() int
GetId returns PhaseTransition.Id, and is useful for accessing the field via an interface.
func (*PhaseTransition) GetStartTime ¶
func (v *PhaseTransition) GetStartTime() float64
GetStartTime returns PhaseTransition.StartTime, and is useful for accessing the field via an interface.
type PlayerDetailsParams ¶
type PlayerDetailsParams struct {
Code string
StartTime float64
EndTime float64
FightIDs []int
EncounterID int
Difficulty int
KillType KillType
IncludeCombatantInfo bool
Translate bool
}
PlayerDetailsParams filters the Client.ReportPlayerDetails query. Code is required; other zero fields are omitted.
type RankingCompareType ¶
type RankingCompareType string
Whether or not rankings are compared against best scores for the entire tier or against all parses in a two week window.
const ( // Compare against rankings. RankingCompareTypeRankings RankingCompareType = "Rankings" // Compare against all parses in a two week window. RankingCompareTypeParses RankingCompareType = "Parses" )
type RankingTimeframeType ¶
type RankingTimeframeType string
Whether or not rankings are today or historical.
const ( // Compare against today's rankings. RankingTimeframeTypeToday RankingTimeframeType = "Today" // Compare against historical rankings. RankingTimeframeTypeHistorical RankingTimeframeType = "Historical" )
type RateLimit ¶
type RateLimit struct {
// The total amount of points this API key can spend per hour.
LimitPerHour int `json:"limitPerHour"`
// The total amount of points spent during this hour.
PointsSpentThisHour float64 `json:"pointsSpentThisHour"`
// The number of seconds remaining until the points reset.
PointsResetIn int `json:"pointsResetIn"`
}
RateLimit includes the GraphQL fields of RateLimitData requested by the fragment RateLimit. The GraphQL type's documentation follows.
A way to obtain your current rate limit usage.
func (*RateLimit) GetLimitPerHour ¶
GetLimitPerHour returns RateLimit.LimitPerHour, and is useful for accessing the field via an interface.
func (*RateLimit) GetPointsResetIn ¶
GetPointsResetIn returns RateLimit.PointsResetIn, and is useful for accessing the field via an interface.
func (*RateLimit) GetPointsSpentThisHour ¶
GetPointsSpentThisHour returns RateLimit.PointsSpentThisHour, and is useful for accessing the field via an interface.
type Region ¶
type Region struct {
// The ID of the region.
Id int `json:"id"`
// The localized name of the region.
Name string `json:"name"`
// The slug for the region, usable when looking up characters and guilds by server.
Slug string `json:"slug"`
// The localized compact name of the region, e.g., US for United States.
CompactName string `json:"compactName"`
// The subregions found within this region.
Subregions []RegionSubregionsSubregion `json:"subregions"`
}
Region includes the GraphQL fields of Region requested by the fragment Region. The GraphQL type's documentation follows.
A single region for the game.
func (*Region) GetCompactName ¶
GetCompactName returns Region.CompactName, and is useful for accessing the field via an interface.
func (*Region) GetId ¶
GetId returns Region.Id, and is useful for accessing the field via an interface.
func (*Region) GetName ¶
GetName returns Region.Name, and is useful for accessing the field via an interface.
func (*Region) GetSlug ¶
GetSlug returns Region.Slug, and is useful for accessing the field via an interface.
func (*Region) GetSubregions ¶
func (v *Region) GetSubregions() []RegionSubregionsSubregion
GetSubregions returns Region.Subregions, and is useful for accessing the field via an interface.
type RegionSubregionsSubregion ¶
type RegionSubregionsSubregion struct {
// The ID of the subregion.
Id int `json:"id"`
// The localized name of the subregion.
Name string `json:"name"`
}
RegionSubregionsSubregion includes the requested fields of the GraphQL type Subregion. The GraphQL type's documentation follows.
A single subregion. Subregions are used to divide a region into sub-categories, such as French or German subregions of a Europe region.
func (*RegionSubregionsSubregion) GetId ¶
func (v *RegionSubregionsSubregion) GetId() int
GetId returns RegionSubregionsSubregion.Id, and is useful for accessing the field via an interface.
func (*RegionSubregionsSubregion) GetName ¶
func (v *RegionSubregionsSubregion) GetName() string
GetName returns RegionSubregionsSubregion.Name, and is useful for accessing the field via an interface.
type RegionSummary ¶
type RegionSummary struct {
// The ID of the region.
Id int `json:"id"`
// The localized name of the region.
Name string `json:"name"`
// The slug for the region, usable when looking up characters and guilds by server.
Slug string `json:"slug"`
// The localized compact name of the region, e.g., US for United States.
CompactName string `json:"compactName"`
}
RegionSummary includes the GraphQL fields of Region requested by the fragment RegionSummary. The GraphQL type's documentation follows.
A single region for the game.
func (*RegionSummary) GetCompactName ¶
func (v *RegionSummary) GetCompactName() string
GetCompactName returns RegionSummary.CompactName, and is useful for accessing the field via an interface.
func (*RegionSummary) GetId ¶
func (v *RegionSummary) GetId() int
GetId returns RegionSummary.Id, and is useful for accessing the field via an interface.
func (*RegionSummary) GetName ¶
func (v *RegionSummary) GetName() string
GetName returns RegionSummary.Name, and is useful for accessing the field via an interface.
func (*RegionSummary) GetSlug ¶
func (v *RegionSummary) GetSlug() string
GetSlug returns RegionSummary.Slug, and is useful for accessing the field via an interface.
type Report ¶
type Report struct {
ReportSummary `json:"-"`
// The visibility level of the report. The possible values are 'public', 'private', and 'unlisted'.
Visibility string `json:"visibility"`
// The revision of the report. This number is increased when reports get re-exported.
Revision int `json:"revision"`
// The number of uploaded segments in the report.
Segments int `json:"segments"`
// The number of exported segments in the report. This is how many segments have been processed for rankings.
ExportedSegments int `json:"exportedSegments"`
// The region of the report.
Region ReportRegion `json:"region"`
// Whether this report has been archived. Events, tables, and graphs for archived reports are inaccessible unless the retrieving user has a subscription including archive access.
ArchiveStatus ReportArchiveStatus `json:"archiveStatus"`
}
Report includes the GraphQL fields of Report requested by the fragment Report. The GraphQL type's documentation follows.
A single report uploaded by a player to a guild or personal logs.
func (*Report) GetArchiveStatus ¶
func (v *Report) GetArchiveStatus() ReportArchiveStatus
GetArchiveStatus returns Report.ArchiveStatus, and is useful for accessing the field via an interface.
func (*Report) GetCode ¶
GetCode returns Report.Code, and is useful for accessing the field via an interface.
func (*Report) GetEndTime ¶
GetEndTime returns Report.EndTime, and is useful for accessing the field via an interface.
func (*Report) GetExportedSegments ¶
GetExportedSegments returns Report.ExportedSegments, and is useful for accessing the field via an interface.
func (*Report) GetGuild ¶
func (v *Report) GetGuild() GuildSummary
GetGuild returns Report.Guild, and is useful for accessing the field via an interface.
func (*Report) GetOwner ¶
GetOwner returns Report.Owner, and is useful for accessing the field via an interface.
func (*Report) GetRegion ¶
func (v *Report) GetRegion() ReportRegion
GetRegion returns Report.Region, and is useful for accessing the field via an interface.
func (*Report) GetRevision ¶
GetRevision returns Report.Revision, and is useful for accessing the field via an interface.
func (*Report) GetSegments ¶
GetSegments returns Report.Segments, and is useful for accessing the field via an interface.
func (*Report) GetStartTime ¶
GetStartTime returns Report.StartTime, and is useful for accessing the field via an interface.
func (*Report) GetTitle ¶
GetTitle returns Report.Title, and is useful for accessing the field via an interface.
func (*Report) GetVisibility ¶
GetVisibility returns Report.Visibility, and is useful for accessing the field via an interface.
func (*Report) GetZone ¶
func (v *Report) GetZone() ZoneSummary
GetZone returns Report.Zone, and is useful for accessing the field via an interface.
func (*Report) MarshalJSON ¶
func (*Report) UnmarshalJSON ¶
type ReportAbility ¶
type ReportAbility struct {
// The game ID of the ability.
GameID float64 `json:"gameID"`
// An icon to use for the ability.
Icon string `json:"icon"`
// The name of the actor.
Name string `json:"name"`
// The type of the ability. This represents the type of damage (e.g., the spell school in WoW).
Type string `json:"type"`
}
ReportAbility includes the GraphQL fields of ReportAbility requested by the fragment ReportAbility. The GraphQL type's documentation follows.
The ReportAbility represents a single ability that occurs in the report.
func (*ReportAbility) GetGameID ¶
func (v *ReportAbility) GetGameID() float64
GetGameID returns ReportAbility.GameID, and is useful for accessing the field via an interface.
func (*ReportAbility) GetIcon ¶
func (v *ReportAbility) GetIcon() string
GetIcon returns ReportAbility.Icon, and is useful for accessing the field via an interface.
func (*ReportAbility) GetName ¶
func (v *ReportAbility) GetName() string
GetName returns ReportAbility.Name, and is useful for accessing the field via an interface.
func (*ReportAbility) GetType ¶
func (v *ReportAbility) GetType() string
GetType returns ReportAbility.Type, and is useful for accessing the field via an interface.
type ReportActor ¶
type ReportActor struct {
// The game ID of the actor.
GameID float64 `json:"gameID"`
// The report ID of the actor. This ID is used in events to identify sources and targets.
Id int `json:"id"`
// The name of the actor.
Name string `json:"name"`
// The type of the actor, i.e., if it is a player, pet or NPC.
Type string `json:"type"`
// The sub-type of the actor, for players it's their class, and for NPCs, they are further subdivided into normal NPCs and bosses.
SubType string `json:"subType"`
// An icon to use for the actor. For pets and NPCs, this will be the icon the site chose to represent that actor.
Icon string `json:"icon"`
// The report ID of the actor's owner if the actor is a pet.
PetOwner int `json:"petOwner"`
// The normalized server name of the actor.
Server string `json:"server"`
}
ReportActor includes the GraphQL fields of ReportActor requested by the fragment ReportActor. The GraphQL type's documentation follows.
The ReportActor represents a single player, pet or NPC that occurs in the report.
func (*ReportActor) GetGameID ¶
func (v *ReportActor) GetGameID() float64
GetGameID returns ReportActor.GameID, and is useful for accessing the field via an interface.
func (*ReportActor) GetIcon ¶
func (v *ReportActor) GetIcon() string
GetIcon returns ReportActor.Icon, and is useful for accessing the field via an interface.
func (*ReportActor) GetId ¶
func (v *ReportActor) GetId() int
GetId returns ReportActor.Id, and is useful for accessing the field via an interface.
func (*ReportActor) GetName ¶
func (v *ReportActor) GetName() string
GetName returns ReportActor.Name, and is useful for accessing the field via an interface.
func (*ReportActor) GetPetOwner ¶
func (v *ReportActor) GetPetOwner() int
GetPetOwner returns ReportActor.PetOwner, and is useful for accessing the field via an interface.
func (*ReportActor) GetServer ¶
func (v *ReportActor) GetServer() string
GetServer returns ReportActor.Server, and is useful for accessing the field via an interface.
func (*ReportActor) GetSubType ¶
func (v *ReportActor) GetSubType() string
GetSubType returns ReportActor.SubType, and is useful for accessing the field via an interface.
func (*ReportActor) GetType ¶
func (v *ReportActor) GetType() string
GetType returns ReportActor.Type, and is useful for accessing the field via an interface.
type ReportActorsParams ¶
ReportActorsParams filters the actors returned by Client.ReportActors. Code is required; other zero fields are omitted from the query. Type selects players, NPCs or pets; SubType selects a player's class or an NPC's classification.
type ReportAnalysisParams ¶
type ReportAnalysisParams struct {
Code string
StartTime float64
EndTime float64
FightIDs []int
EncounterID int
Difficulty int
KillType KillType
HostilityType HostilityType
SourceID int
TargetID int
AbilityID float64
FilterExpression string
ViewBy ViewType
}
ReportAnalysisParams filters the Client.ReportTable and Client.ReportGraph queries. Code is required; other zero fields are omitted. For arguments not exposed here, use Client.Execute.
type ReportArchiveStatus ¶
type ReportArchiveStatus struct {
// Whether the report has been archived.
IsArchived bool `json:"isArchived"`
// Whether the current user can access the report. Always true if the report is not archived, and always false if not using user authentication.
IsAccessible bool `json:"isAccessible"`
// The date on which the report was archived (if it has been archived).
ArchiveDate int `json:"archiveDate"`
}
ReportArchiveStatus includes the requested fields of the GraphQL type ReportArchiveStatus. The GraphQL type's documentation follows.
The archival status of a report.
func (*ReportArchiveStatus) GetArchiveDate ¶
func (v *ReportArchiveStatus) GetArchiveDate() int
GetArchiveDate returns ReportArchiveStatus.ArchiveDate, and is useful for accessing the field via an interface.
func (*ReportArchiveStatus) GetIsAccessible ¶
func (v *ReportArchiveStatus) GetIsAccessible() bool
GetIsAccessible returns ReportArchiveStatus.IsAccessible, and is useful for accessing the field via an interface.
func (*ReportArchiveStatus) GetIsArchived ¶
func (v *ReportArchiveStatus) GetIsArchived() bool
GetIsArchived returns ReportArchiveStatus.IsArchived, and is useful for accessing the field via an interface.
type ReportEventsParams ¶
type ReportEventsParams struct {
Code string
StartTime float64
EndTime float64
FightIDs []int
EncounterID int
Difficulty int
KillType KillType
HostilityType HostilityType
SourceID int
TargetID int
AbilityID float64
FilterExpression string
IncludeResources bool
Limit int
}
ReportEventsParams filters the Client.ReportEvents query. Code is required; other zero fields are omitted.
type ReportFight ¶
type ReportFight struct {
// The report ID of the fight. This ID can be used to fetch only events, tables or graphs for this fight.
Id int `json:"id"`
// The name of the fight.
Name string `json:"name"`
// The encounter ID of the fight. If the ID is 0, the fight is considered a trash fight.
EncounterID int `json:"encounterID"`
// Some boss fights may be converted to trash fights (encounterID = 0). When this occurs, `originalEncounterID` contains the original ID of the encounter.
OriginalEncounterID *int `json:"originalEncounterID"`
// The difficulty setting for the raid, dungeon, or arena. Null for trash.
Difficulty *int `json:"difficulty"`
// The group size for the raid, dungeon, or arena. Null for trash.
Size *int `json:"size"`
// Whether or not the fight was a boss kill, i.e., successful. If this field is false, it means the fight was a wipe or a failed run, etc..
Kill *bool `json:"kill"`
// Whether or not the fight is still in progress. If this field is false, it means the entire fight has been uploaded.
InProgress *bool `json:"inProgress"`
// Whether or not a fight represents an entire raid from start to finish, e.g., in Classic WoW a complete run of Blackwing Lair.
CompleteRaid bool `json:"completeRaid"`
// The start time of the fight. This is a timestamp with millisecond precision that is relative to the start of the report, i.e., the start of the report is considered time 0.
StartTime float64 `json:"startTime"`
// The end time of the fight. This is a timestamp with millisecond precision that is relative to the start of the report, i.e., the start of the report is considered time 0.
EndTime float64 `json:"endTime"`
// The actual completion percentage of the fight. This is the field used to indicate how far into a fight a wipe was, since fights can be complicated and have multiple bosses, no bosses, bosses that heal, etc.
FightPercentage *float64 `json:"fightPercentage"`
// The percentage health of the active boss or bosses at the end of a fight.
BossPercentage *float64 `json:"bossPercentage"`
// The average item level of the players in the fight.
AverageItemLevel *float64 `json:"averageItemLevel"`
// The IDs of all players involved in a fight. These players can be referenced in the master data actors table to get detailed information about each participant.
FriendlyPlayers []int `json:"friendlyPlayers"`
// The IDs of all players involved in a fight. These players can be referenced in the master data actors table to get detailed information about each participant.
EnemyPlayers []int `json:"enemyPlayers"`
// The keystone level for a Mythic+ dungeon.
KeystoneLevel *int `json:"keystoneLevel"`
// The completion time for a Challenge Mode or Mythic+ Dungeon. This is the official time used on Blizzard leaderboards.
KeystoneTime *int `json:"keystoneTime"`
// The bonus field represents Bronze, Silver or Gold in Challenge Modes, or +1-+3 pushing of Mythic+ keys. It has the values 1, 2, and 3.
KeystoneBonus *int `json:"keystoneBonus"`
// The affixes for a Mythic+ dungeon.
KeystoneAffixes []int `json:"keystoneAffixes"`
// The hard mode level of the fight. Most fights don't support optional hard modes. This only applies to bosses like Sartharion.
HardModeLevel *int `json:"hardModeLevel"`
// The phase that the encounter was in when the fight ended. Counts up from 1 based off the phase type (i.e., normal phase vs intermission).
LastPhase *int `json:"lastPhase"`
// The phase that the encounter was in when the fight ended. Always increases from 0, so a fight with three real phases and two intermissions would count up from 0 to 4.
LastPhaseAsAbsoluteIndex *int `json:"lastPhaseAsAbsoluteIndex"`
// Whether or not the phase that the encounter was in when the fight ended was an intermission or not.
LastPhaseIsIntermission *bool `json:"lastPhaseIsIntermission"`
// List of observed phase transitions during the fight.
PhaseTransitions []PhaseTransition `json:"phaseTransitions"`
// The game zone the fight takes place in. This should not be confused with the zones used by the sites for rankings. This is the actual in-game zone info.
GameZone GameZoneSummary `json:"gameZone"`
}
Nullable fields are generated as pointers so callers can tell absent from the zero value: on a trash fight kill, difficulty and size are all null.
func (*ReportFight) GetAverageItemLevel ¶
func (v *ReportFight) GetAverageItemLevel() *float64
GetAverageItemLevel returns ReportFight.AverageItemLevel, and is useful for accessing the field via an interface.
func (*ReportFight) GetBossPercentage ¶
func (v *ReportFight) GetBossPercentage() *float64
GetBossPercentage returns ReportFight.BossPercentage, and is useful for accessing the field via an interface.
func (*ReportFight) GetCompleteRaid ¶
func (v *ReportFight) GetCompleteRaid() bool
GetCompleteRaid returns ReportFight.CompleteRaid, and is useful for accessing the field via an interface.
func (*ReportFight) GetDifficulty ¶
func (v *ReportFight) GetDifficulty() *int
GetDifficulty returns ReportFight.Difficulty, and is useful for accessing the field via an interface.
func (*ReportFight) GetEncounterID ¶
func (v *ReportFight) GetEncounterID() int
GetEncounterID returns ReportFight.EncounterID, and is useful for accessing the field via an interface.
func (*ReportFight) GetEndTime ¶
func (v *ReportFight) GetEndTime() float64
GetEndTime returns ReportFight.EndTime, and is useful for accessing the field via an interface.
func (*ReportFight) GetEnemyPlayers ¶
func (v *ReportFight) GetEnemyPlayers() []int
GetEnemyPlayers returns ReportFight.EnemyPlayers, and is useful for accessing the field via an interface.
func (*ReportFight) GetFightPercentage ¶
func (v *ReportFight) GetFightPercentage() *float64
GetFightPercentage returns ReportFight.FightPercentage, and is useful for accessing the field via an interface.
func (*ReportFight) GetFriendlyPlayers ¶
func (v *ReportFight) GetFriendlyPlayers() []int
GetFriendlyPlayers returns ReportFight.FriendlyPlayers, and is useful for accessing the field via an interface.
func (*ReportFight) GetGameZone ¶
func (v *ReportFight) GetGameZone() GameZoneSummary
GetGameZone returns ReportFight.GameZone, and is useful for accessing the field via an interface.
func (*ReportFight) GetHardModeLevel ¶
func (v *ReportFight) GetHardModeLevel() *int
GetHardModeLevel returns ReportFight.HardModeLevel, and is useful for accessing the field via an interface.
func (*ReportFight) GetId ¶
func (v *ReportFight) GetId() int
GetId returns ReportFight.Id, and is useful for accessing the field via an interface.
func (*ReportFight) GetInProgress ¶
func (v *ReportFight) GetInProgress() *bool
GetInProgress returns ReportFight.InProgress, and is useful for accessing the field via an interface.
func (*ReportFight) GetKeystoneAffixes ¶
func (v *ReportFight) GetKeystoneAffixes() []int
GetKeystoneAffixes returns ReportFight.KeystoneAffixes, and is useful for accessing the field via an interface.
func (*ReportFight) GetKeystoneBonus ¶
func (v *ReportFight) GetKeystoneBonus() *int
GetKeystoneBonus returns ReportFight.KeystoneBonus, and is useful for accessing the field via an interface.
func (*ReportFight) GetKeystoneLevel ¶
func (v *ReportFight) GetKeystoneLevel() *int
GetKeystoneLevel returns ReportFight.KeystoneLevel, and is useful for accessing the field via an interface.
func (*ReportFight) GetKeystoneTime ¶
func (v *ReportFight) GetKeystoneTime() *int
GetKeystoneTime returns ReportFight.KeystoneTime, and is useful for accessing the field via an interface.
func (*ReportFight) GetKill ¶
func (v *ReportFight) GetKill() *bool
GetKill returns ReportFight.Kill, and is useful for accessing the field via an interface.
func (*ReportFight) GetLastPhase ¶
func (v *ReportFight) GetLastPhase() *int
GetLastPhase returns ReportFight.LastPhase, and is useful for accessing the field via an interface.
func (*ReportFight) GetLastPhaseAsAbsoluteIndex ¶
func (v *ReportFight) GetLastPhaseAsAbsoluteIndex() *int
GetLastPhaseAsAbsoluteIndex returns ReportFight.LastPhaseAsAbsoluteIndex, and is useful for accessing the field via an interface.
func (*ReportFight) GetLastPhaseIsIntermission ¶
func (v *ReportFight) GetLastPhaseIsIntermission() *bool
GetLastPhaseIsIntermission returns ReportFight.LastPhaseIsIntermission, and is useful for accessing the field via an interface.
func (*ReportFight) GetName ¶
func (v *ReportFight) GetName() string
GetName returns ReportFight.Name, and is useful for accessing the field via an interface.
func (*ReportFight) GetOriginalEncounterID ¶
func (v *ReportFight) GetOriginalEncounterID() *int
GetOriginalEncounterID returns ReportFight.OriginalEncounterID, and is useful for accessing the field via an interface.
func (*ReportFight) GetPhaseTransitions ¶
func (v *ReportFight) GetPhaseTransitions() []PhaseTransition
GetPhaseTransitions returns ReportFight.PhaseTransitions, and is useful for accessing the field via an interface.
func (*ReportFight) GetSize ¶
func (v *ReportFight) GetSize() *int
GetSize returns ReportFight.Size, and is useful for accessing the field via an interface.
func (*ReportFight) GetStartTime ¶
func (v *ReportFight) GetStartTime() float64
GetStartTime returns ReportFight.StartTime, and is useful for accessing the field via an interface.
func (*ReportFight) PhaseAt ¶
func (f *ReportFight) PhaseAt(t float64) (PhaseTransition, bool)
PhaseAt returns the phase the fight was in at report-relative timestamp t, and whether one was found. It reports false for a timestamp before the first transition, and for fights with no phase data. Join PhaseTransition.Id against ReportWithFights.PhasesFor to resolve the name.
Prefer this to ReportFight.LastPhase, which numbers normal phases and intermissions separately and so only resolves alongside LastPhaseIsIntermission. A fight may also re-enter a phase it has already been in.
type ReportMasterData ¶
type ReportMasterData struct {
// The version of the client parser that was used to parse and upload this log file.
LogVersion int `json:"logVersion"`
// The version of the game that generated the log file. Used to distinguish Classic and Retail Warcraft primarily.
GameVersion int `json:"gameVersion"`
// The auto-detected locale of the report. This is the source language of the original log file.
Lang string `json:"lang"`
// A list of every ability that occurs in the report.
Abilities []ReportAbility `json:"abilities"`
// A list of every actor (player, NPC, pet) that occurs in the report.
Actors []ReportActor `json:"actors"`
}
ReportMasterData includes the GraphQL fields of ReportMasterData requested by the fragment ReportMasterData. The GraphQL type's documentation follows.
The ReporMastertData object contains information about the log version of a report, as well as the actors and abilities used in the report.
func (*ReportMasterData) GetAbilities ¶
func (v *ReportMasterData) GetAbilities() []ReportAbility
GetAbilities returns ReportMasterData.Abilities, and is useful for accessing the field via an interface.
func (*ReportMasterData) GetActors ¶
func (v *ReportMasterData) GetActors() []ReportActor
GetActors returns ReportMasterData.Actors, and is useful for accessing the field via an interface.
func (*ReportMasterData) GetGameVersion ¶
func (v *ReportMasterData) GetGameVersion() int
GetGameVersion returns ReportMasterData.GameVersion, and is useful for accessing the field via an interface.
func (*ReportMasterData) GetLang ¶
func (v *ReportMasterData) GetLang() string
GetLang returns ReportMasterData.Lang, and is useful for accessing the field via an interface.
func (*ReportMasterData) GetLogVersion ¶
func (v *ReportMasterData) GetLogVersion() int
GetLogVersion returns ReportMasterData.LogVersion, and is useful for accessing the field via an interface.
type ReportPage ¶
type ReportPage struct {
// Number of total items selected by the query
Total int `json:"total"`
// Number of items returned per page
PerPage int `json:"perPage"`
// Current page of the cursor
CurrentPage int `json:"currentPage"`
// The last page (number of pages)
LastPage int `json:"lastPage"`
// Determines if cursor has more pages after the current page
HasMorePages bool `json:"hasMorePages"`
// Number of the first item returned
From int `json:"from"`
// Number of the last item returned
To int `json:"to"`
// List of items on the current page
Data []ReportSummary `json:"data"`
}
Aliased because the schema spells these snake_case, which would otherwise generate Go fields like Per_page.
func (*ReportPage) GetCurrentPage ¶
func (v *ReportPage) GetCurrentPage() int
GetCurrentPage returns ReportPage.CurrentPage, and is useful for accessing the field via an interface.
func (*ReportPage) GetData ¶
func (v *ReportPage) GetData() []ReportSummary
GetData returns ReportPage.Data, and is useful for accessing the field via an interface.
func (*ReportPage) GetFrom ¶
func (v *ReportPage) GetFrom() int
GetFrom returns ReportPage.From, and is useful for accessing the field via an interface.
func (*ReportPage) GetHasMorePages ¶
func (v *ReportPage) GetHasMorePages() bool
GetHasMorePages returns ReportPage.HasMorePages, and is useful for accessing the field via an interface.
func (*ReportPage) GetLastPage ¶
func (v *ReportPage) GetLastPage() int
GetLastPage returns ReportPage.LastPage, and is useful for accessing the field via an interface.
func (*ReportPage) GetPerPage ¶
func (v *ReportPage) GetPerPage() int
GetPerPage returns ReportPage.PerPage, and is useful for accessing the field via an interface.
func (*ReportPage) GetTo ¶
func (v *ReportPage) GetTo() int
GetTo returns ReportPage.To, and is useful for accessing the field via an interface.
func (*ReportPage) GetTotal ¶
func (v *ReportPage) GetTotal() int
GetTotal returns ReportPage.Total, and is useful for accessing the field via an interface.
type ReportRankingMetricType ¶
type ReportRankingMetricType string
All the possible metrics.
const ( // Boss cDPS is unique to FFXIV and is damage done to the boss adjusted for raid-contributing buffs and debuffs. ReportRankingMetricTypeBosscdps ReportRankingMetricType = "bosscdps" // Boss damage per second. ReportRankingMetricTypeBossdps ReportRankingMetricType = "bossdps" // Boss nDPS is unique to FFXIV and is damage done to the boss adjusted for raid-contributing buffs and debuffs. ReportRankingMetricTypeBossndps ReportRankingMetricType = "bossndps" // Boss rDPS is unique to FFXIV and is damage done to the boss adjusted for raid-contributing buffs and debuffs. ReportRankingMetricTypeBossrdps ReportRankingMetricType = "bossrdps" // Choose an appropriate default depending on the other selected parameters. ReportRankingMetricTypeDefault ReportRankingMetricType = "default" // Damage per second. ReportRankingMetricTypeDps ReportRankingMetricType = "dps" // Healing per second. ReportRankingMetricTypeHps ReportRankingMetricType = "hps" // Survivability ranking for tanks. Deprecated. Only supported for some older WoW zones. ReportRankingMetricTypeKrsi ReportRankingMetricType = "krsi" // Score. Used by WoW Mythic dungeons and by ESO trials. ReportRankingMetricTypePlayerscore ReportRankingMetricType = "playerscore" // Speed. Not supported by every zone. ReportRankingMetricTypePlayerspeed ReportRankingMetricType = "playerspeed" // cDPS is unique to FFXIV and is damage done adjusted for raid-contributing buffs and debuffs. ReportRankingMetricTypeCdps ReportRankingMetricType = "cdps" // nDPS is unique to FFXIV and is damage done adjusted for raid-contributing buffs and debuffs. ReportRankingMetricTypeNdps ReportRankingMetricType = "ndps" // rDPS is unique to FFXIV and is damage done adjusted for raid-contributing buffs and debuffs. ReportRankingMetricTypeRdps ReportRankingMetricType = "rdps" // Healing done per second to tanks. ReportRankingMetricTypeTankhps ReportRankingMetricType = "tankhps" // Weighted damage per second. Unique to WoW currently. Used to remove pad damage and reward damage done to high priority targets. ReportRankingMetricTypeWdps ReportRankingMetricType = "wdps" )
type ReportRankingsParams ¶
type ReportRankingsParams struct {
Code string
EncounterID int
Difficulty int
FightIDs []int
PlayerMetric ReportRankingMetricType
Compare RankingCompareType
Timeframe RankingTimeframeType
}
ReportRankingsParams filters the Client.ReportRankings query. Code is required; other zero fields are omitted.
type ReportRegion ¶
type ReportRegion struct {
// The ID of the region.
Id int `json:"id"`
// The localized name of the region.
Name string `json:"name"`
}
ReportRegion includes the requested fields of the GraphQL type Region. The GraphQL type's documentation follows.
A single region for the game.
func (*ReportRegion) GetId ¶
func (v *ReportRegion) GetId() int
GetId returns ReportRegion.Id, and is useful for accessing the field via an interface.
func (*ReportRegion) GetName ¶
func (v *ReportRegion) GetName() string
GetName returns ReportRegion.Name, and is useful for accessing the field via an interface.
type ReportSummary ¶
type ReportSummary struct {
// The report code, a unique value used to identify the report.
Code string `json:"code"`
// A title for the report.
Title string `json:"title"`
// The start time of the report. This is a UNIX timestamp representing the timestamp of the first event contained in the report.
StartTime float64 `json:"startTime"`
// The end time of the report. This is a UNIX timestamp representing the timestamp of the last event contained in the report.
EndTime float64 `json:"endTime"`
// The principal zone that the report contains fights for. Null if no supported zone exists.
Zone ZoneSummary `json:"zone"`
// The guild that the report belongs to. If this is null, then the report was uploaded to the user's personal logs.
Guild GuildSummary `json:"guild"`
// The user that uploaded the report.
Owner User `json:"owner"`
}
The fields a listing needs. Spread this rather than Report where the selection is repeated per row.
func (*ReportSummary) GetCode ¶
func (v *ReportSummary) GetCode() string
GetCode returns ReportSummary.Code, and is useful for accessing the field via an interface.
func (*ReportSummary) GetEndTime ¶
func (v *ReportSummary) GetEndTime() float64
GetEndTime returns ReportSummary.EndTime, and is useful for accessing the field via an interface.
func (*ReportSummary) GetGuild ¶
func (v *ReportSummary) GetGuild() GuildSummary
GetGuild returns ReportSummary.Guild, and is useful for accessing the field via an interface.
func (*ReportSummary) GetOwner ¶
func (v *ReportSummary) GetOwner() User
GetOwner returns ReportSummary.Owner, and is useful for accessing the field via an interface.
func (*ReportSummary) GetStartTime ¶
func (v *ReportSummary) GetStartTime() float64
GetStartTime returns ReportSummary.StartTime, and is useful for accessing the field via an interface.
func (*ReportSummary) GetTitle ¶
func (v *ReportSummary) GetTitle() string
GetTitle returns ReportSummary.Title, and is useful for accessing the field via an interface.
func (*ReportSummary) GetZone ¶
func (v *ReportSummary) GetZone() ZoneSummary
GetZone returns ReportSummary.Zone, and is useful for accessing the field via an interface.
type ReportWithFights ¶
type ReportWithFights struct {
Report
Fights []ReportFight
Phases []EncounterPhases
}
ReportWithFights is a report header together with its fights and the phase metadata of every boss encounter the report observed.
func (*ReportWithFights) PhasesFor ¶
func (r *ReportWithFights) PhasesFor(encounterID int) []PhaseMetadata
PhasesFor returns the phase metadata for an encounter, or nil if the report carries none. PhaseMetadata.Id lines up with PhaseTransition.Id.
type ReportWithFightsParams ¶
type ReportWithFightsParams struct {
Code string
AllowUnlisted bool
EncounterID int
Difficulty int
KillType KillType
FightIDs []int
Translate bool
}
ReportWithFightsParams filters the fights returned by Client.ReportWithFights. Code is required; other zero fields are omitted from the query.
type ReportsParams ¶
type ReportsParams struct {
GuildID int
GuildName string
GuildServerSlug string
GuildServerRegion string
GuildTagID int
UserID int
ZoneID int
GameZoneID int
StartTime float64
EndTime float64
Limit int
Page int
}
ReportsParams selects the reports returned by Client.Reports. Zero fields are omitted from the query. Identify a guild either by GuildID or by the GuildName, GuildServerSlug and GuildServerRegion trio; GuildTagID takes precedence over both. UserID lists a user's personal logs instead.
type Server ¶
type Server struct {
// The ID of the server.
Id int `json:"id"`
// The name of the server in the locale of the subregion that the server belongs to.
Name string `json:"name"`
// The normalized name is a transformation of the name, dropping spaces. It is how the server appears in a World of Warcraft log file.
NormalizedName string `json:"normalizedName"`
// The server slug, also a transformation of the name following Blizzard rules. For retail World of Warcraft realms, this slug will be in English. For all other games, the slug is just a transformation of the name field.
Slug string `json:"slug"`
// The Blizzard ID of the server.
BlizzardID int `json:"blizzardID"`
// The connected realm ID of the server.
ConnectedRealmID int `json:"connectedRealmID"`
// The region that this server belongs to.
Region RegionSummary `json:"region"`
}
Server includes the GraphQL fields of Server requested by the fragment Server. The GraphQL type's documentation follows.
A single server. Servers correspond to actual game servers that characters and guilds reside on.
func (*Server) GetBlizzardID ¶
GetBlizzardID returns Server.BlizzardID, and is useful for accessing the field via an interface.
func (*Server) GetConnectedRealmID ¶
GetConnectedRealmID returns Server.ConnectedRealmID, and is useful for accessing the field via an interface.
func (*Server) GetId ¶
GetId returns Server.Id, and is useful for accessing the field via an interface.
func (*Server) GetName ¶
GetName returns Server.Name, and is useful for accessing the field via an interface.
func (*Server) GetNormalizedName ¶
GetNormalizedName returns Server.NormalizedName, and is useful for accessing the field via an interface.
func (*Server) GetRegion ¶
func (v *Server) GetRegion() RegionSummary
GetRegion returns Server.Region, and is useful for accessing the field via an interface.
type TableDataType ¶
type TableDataType string
The type of table to examine.
const ( // Summary Overview TableDataTypeSummary TableDataType = "Summary" // Buffs. TableDataTypeBuffs TableDataType = "Buffs" // Casts. TableDataTypeCasts TableDataType = "Casts" // Damage done. TableDataTypeDamageDone TableDataType = "DamageDone" // Damage taken. TableDataTypeDamageTaken TableDataType = "DamageTaken" // Deaths. TableDataTypeDeaths TableDataType = "Deaths" // Debuffs. TableDataTypeDebuffs TableDataType = "Debuffs" // Dispels. TableDataTypeDispels TableDataType = "Dispels" // Healing done. TableDataTypeHealing TableDataType = "Healing" // Interrupts. TableDataTypeInterrupts TableDataType = "Interrupts" // Resources. TableDataTypeResources TableDataType = "Resources" // Summons TableDataTypeSummons TableDataType = "Summons" // Survivability (death info across multiple pulls). TableDataTypeSurvivability TableDataType = "Survivability" // Threat. TableDataTypeThreat TableDataType = "Threat" )
type User ¶
type User struct {
// The ID of the user.
Id int `json:"id"`
// The name of the user.
Name string `json:"name"`
}
User includes the GraphQL fields of User requested by the fragment User. The GraphQL type's documentation follows.
A single user of the site. Most fields can only be accessed when authenticated as that user with the "view-user-profile" scope.
type ViewType ¶
type ViewType string
Whether the view is by source, target, or ability.
const ( // Use the same default that the web site picks based off the other selected parameters. ViewTypeDefault ViewType = "Default" // View by ability. ViewTypeAbility ViewType = "Ability" // View. by source. ViewTypeSource ViewType = "Source" // View by target. ViewTypeTarget ViewType = "Target" )
type Zone ¶
type Zone struct {
// The ID of the zone.
Id int `json:"id"`
// The name of the zone.
Name string `json:"name"`
// Whether or not the entire zone (including all its partitions) is permanently frozen. When a zone is frozen, data involving that zone will never change and can be cached forever.
Frozen bool `json:"frozen"`
// The expansion that this zone belongs to.
Expansion ExpansionSummary `json:"expansion"`
// A list of all the difficulties supported for this zone.
Difficulties []ZoneDifficultiesDifficulty `json:"difficulties"`
// The encounters found within this zone.
Encounters []ZoneEncountersEncounter `json:"encounters"`
// A list of all the partitions supported for this zone.
Partitions []ZonePartitionsPartition `json:"partitions"`
// The bracket information for this zone. This field will be null if the zone does not support brackets.
Brackets ZoneBracketsBracket `json:"brackets"`
}
Zone includes the GraphQL fields of Zone requested by the fragment Zone. The GraphQL type's documentation follows.
A single zone from an expansion that represents a raid, dungeon, arena, etc.
func (*Zone) GetBrackets ¶
func (v *Zone) GetBrackets() ZoneBracketsBracket
GetBrackets returns Zone.Brackets, and is useful for accessing the field via an interface.
func (*Zone) GetDifficulties ¶
func (v *Zone) GetDifficulties() []ZoneDifficultiesDifficulty
GetDifficulties returns Zone.Difficulties, and is useful for accessing the field via an interface.
func (*Zone) GetEncounters ¶
func (v *Zone) GetEncounters() []ZoneEncountersEncounter
GetEncounters returns Zone.Encounters, and is useful for accessing the field via an interface.
func (*Zone) GetExpansion ¶
func (v *Zone) GetExpansion() ExpansionSummary
GetExpansion returns Zone.Expansion, and is useful for accessing the field via an interface.
func (*Zone) GetFrozen ¶
GetFrozen returns Zone.Frozen, and is useful for accessing the field via an interface.
func (*Zone) GetName ¶
GetName returns Zone.Name, and is useful for accessing the field via an interface.
func (*Zone) GetPartitions ¶
func (v *Zone) GetPartitions() []ZonePartitionsPartition
GetPartitions returns Zone.Partitions, and is useful for accessing the field via an interface.
type ZoneBracketsBracket ¶
type ZoneBracketsBracket struct {
// An integer representing the minimum value used by bracket number 1, etc.
Min float64 `json:"min"`
// An integer representing the value used by bracket N when there are a total of N brackets, etc.
Max float64 `json:"max"`
// A float representing the value to increment when moving from bracket 1 to bracket N, etc.
Bucket float64 `json:"bucket"`
// The localized name of the bracket type.
Type string `json:"type"`
}
ZoneBracketsBracket includes the requested fields of the GraphQL type Bracket. The GraphQL type's documentation follows.
A bracket description for a given raid zone. Brackets have a minimum value, maximum value, and a bucket that can be used to establish all of the possible brackets. The type field indicates what the brackets represent, e.g., item levels or game patches, etc.
func (*ZoneBracketsBracket) GetBucket ¶
func (v *ZoneBracketsBracket) GetBucket() float64
GetBucket returns ZoneBracketsBracket.Bucket, and is useful for accessing the field via an interface.
func (*ZoneBracketsBracket) GetMax ¶
func (v *ZoneBracketsBracket) GetMax() float64
GetMax returns ZoneBracketsBracket.Max, and is useful for accessing the field via an interface.
func (*ZoneBracketsBracket) GetMin ¶
func (v *ZoneBracketsBracket) GetMin() float64
GetMin returns ZoneBracketsBracket.Min, and is useful for accessing the field via an interface.
func (*ZoneBracketsBracket) GetType ¶
func (v *ZoneBracketsBracket) GetType() string
GetType returns ZoneBracketsBracket.Type, and is useful for accessing the field via an interface.
type ZoneDifficultiesDifficulty ¶
type ZoneDifficultiesDifficulty struct {
// An integer representing a specific difficulty level within a zone. For example, in World of Warcraft, this could be Mythic. In FF, it could be Savage, etc.
Id int `json:"id"`
// The localized name for the difficulty level.
Name string `json:"name"`
// A list of supported sizes for the difficulty level. An empty result means that the difficulty level has a flexible raid size.
Sizes []int `json:"sizes"`
}
ZoneDifficultiesDifficulty includes the requested fields of the GraphQL type Difficulty. The GraphQL type's documentation follows.
A single difficulty for a given raid zone. Difficulties have an integer value representing the actual difficulty, a localized name that describes the difficulty level, and a list of valid sizes for the difficulty level.
func (*ZoneDifficultiesDifficulty) GetId ¶
func (v *ZoneDifficultiesDifficulty) GetId() int
GetId returns ZoneDifficultiesDifficulty.Id, and is useful for accessing the field via an interface.
func (*ZoneDifficultiesDifficulty) GetName ¶
func (v *ZoneDifficultiesDifficulty) GetName() string
GetName returns ZoneDifficultiesDifficulty.Name, and is useful for accessing the field via an interface.
func (*ZoneDifficultiesDifficulty) GetSizes ¶
func (v *ZoneDifficultiesDifficulty) GetSizes() []int
GetSizes returns ZoneDifficultiesDifficulty.Sizes, and is useful for accessing the field via an interface.
type ZoneEncountersEncounter ¶
type ZoneEncountersEncounter struct {
// The ID of the encounter.
Id int `json:"id"`
// The localized name of the encounter.
Name string `json:"name"`
}
ZoneEncountersEncounter includes the requested fields of the GraphQL type Encounter. The GraphQL type's documentation follows.
A single encounter for the game.
func (*ZoneEncountersEncounter) GetId ¶
func (v *ZoneEncountersEncounter) GetId() int
GetId returns ZoneEncountersEncounter.Id, and is useful for accessing the field via an interface.
func (*ZoneEncountersEncounter) GetName ¶
func (v *ZoneEncountersEncounter) GetName() string
GetName returns ZoneEncountersEncounter.Name, and is useful for accessing the field via an interface.
type ZonePartitionsPartition ¶
type ZonePartitionsPartition struct {
// An integer representing a specific partition within a zone.
Id int `json:"id"`
// The localized name for partition.
Name string `json:"name"`
// The compact localized name for the partition. Typically an abbreviation to conserve space.
CompactName string `json:"compactName"`
// Whether or not the partition is the current default when viewing rankings or statistics for the zone.
Default bool `json:"default"`
}
ZonePartitionsPartition includes the requested fields of the GraphQL type Partition. The GraphQL type's documentation follows.
A single partition for a given raid zone. Partitions have an integer value representing the actual partition and a localized name that describes what the partition represents. Partitions contain their own rankings, statistics and all stars.
func (*ZonePartitionsPartition) GetCompactName ¶
func (v *ZonePartitionsPartition) GetCompactName() string
GetCompactName returns ZonePartitionsPartition.CompactName, and is useful for accessing the field via an interface.
func (*ZonePartitionsPartition) GetDefault ¶
func (v *ZonePartitionsPartition) GetDefault() bool
GetDefault returns ZonePartitionsPartition.Default, and is useful for accessing the field via an interface.
func (*ZonePartitionsPartition) GetId ¶
func (v *ZonePartitionsPartition) GetId() int
GetId returns ZonePartitionsPartition.Id, and is useful for accessing the field via an interface.
func (*ZonePartitionsPartition) GetName ¶
func (v *ZonePartitionsPartition) GetName() string
GetName returns ZonePartitionsPartition.Name, and is useful for accessing the field via an interface.
type ZoneRankingsParams ¶
type ZoneRankingsParams struct {
Character CharacterRef
ZoneID int
Metric CharacterPageRankingMetricType
Difficulty int
Partition int
Role RoleType
Size int
ClassName string
SpecName string
ByBracket bool
Timeframe RankingTimeframeType
Compare RankingCompareType
IncludePrivateLogs bool
}
ZoneRankingsParams filters character zone rankings. Zero fields are omitted.
type ZoneSummary ¶
type ZoneSummary struct {
// The ID of the zone.
Id int `json:"id"`
// The name of the zone.
Name string `json:"name"`
}
ZoneSummary includes the GraphQL fields of Zone requested by the fragment ZoneSummary. The GraphQL type's documentation follows.
A single zone from an expansion that represents a raid, dungeon, arena, etc.
func (*ZoneSummary) GetId ¶
func (v *ZoneSummary) GetId() int
GetId returns ZoneSummary.Id, and is useful for accessing the field via an interface.
func (*ZoneSummary) GetName ¶
func (v *ZoneSummary) GetName() string
GetName returns ZoneSummary.Name, and is useful for accessing the field via an interface.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
analysis
command
Command analysis walks a single report end to end: metadata, a fight summary, the damage breakdown of the last boss kill, and the deaths of the costliest pull.
|
Command analysis walks a single report end to end: metadata, a fight summary, the damage breakdown of the last boss kill, and the deaths of the costliest pull. |
|
basic
command
|
|
|
userauth
command
Command userauth runs the OAuth 2.0 authorization-code flow with PKCE and calls an endpoint that only works with user authentication.
|
Command userauth runs the OAuth 2.0 authorization-code flow with PKCE and calls an endpoint that only works with user authentication. |