blizzard

package module
v0.0.0-...-d3a0b41 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 19 Imported by: 0

README

blizzard

GoDoc Go Report Card Build Status Codacy Badge

This is a Go client library for gathering Blizzard API reference data

Table of Contents

Getting Started

First, download the Blizzard library:

go get github.com/FuzzyStatic/blizzard

Start using the library by initiating a new Blizzard config structure for your desired region and locale (client_id and client_secret can be acquired through your developer account at https://develop.battle.net/) and requesting an access token:

blizz := blizzard.NewClient("client_id", "client_secret", blizzard.US, blizzard.EnUS)

err := blizz.Token()
if err != nil {
  fmt.Println(err)
}
Fetching OAuth Data

Now you can fetch data from the Blizzard API. For example, you validate your token:

dat, _, err := blizz.TokenValidation()
if err != nil {
  fmt.Println(err)
}

fmt.Printf("%+v\n", dat)
Fetching Diablo 3 Data

You can use the functions prefixed with "D3" to acquire Diablo 3 information. For example, you can get information about the current D3 hardcore necromancer leaderboards:

dat, _, err := blizz.D3SeasonLeaderboardHardcoreNecromancer(15)
if err != nil {
  fmt.Println(err)
}

fmt.Printf("%+v\n", dat)
Fetching Hearthstone Data

You can use the functions prefixed with "HS" to acquire Hearthstone information. For example, you can get information about all the Hearthstone cards:

dat, _, err := blizz.HSCardsAll()
if err != nil {
  fmt.Println(err)
}

fmt.Printf("%+v\n", dat)
Fetching StarCraft 2 Data

You can use the functions prefixed with "SC2" to acquire StarCraft 2 information. For example, you can get information about the current SC2 grandmaster ladder:

dat, _, err := blizz.SC2LadderGrandmaster(blizzard.EU)
if err != nil {
  fmt.Println(err)
}

fmt.Printf("%+v\n", dat)
Fetching World of Warcraft Data

You can use the functions prefixed with "WoW" to acquire World of Warcraft information. For example, you can get information about your WoW character profile:

dat, _, err := blizz.WoWCharacterProfileSummary("illidan", "wildz")
if err != nil {
  fmt.Println(err)
}

fmt.Printf("%+v\n", dat)

or get information about specific spells:

dat, _, err := blizz.WoWSpell(17086)
if err != nil {
  fmt.Println(err)
}

fmt.Printf("%+v\n", dat)

or the PvP leaderboards:

dat, _, err := blizz.WoWCharacterPvPBracketStatistics(wowp.Bracket3v3)
if err != nil {
  fmt.Println(err)
}

fmt.Printf("%+v\n", dat)
Fetching World of Warcraft Classic Data

You can use the functions prefixed with "ClassicWoW" to acquire World of Warcraft Classic information. For example, you can get information about WoW Classic creature data:

dat, _, err := blizz.ClassicWoWCreature(30)
if err != nil {
  fmt.Println(err)
}

fmt.Printf("%+v\n", dat)

Authorization for User Data

To use the UserInfoHeader or WoWUserCharacters functions to acquire data about other users (and not your own), you must use the OAuth2 redirect method to get an authorized token. This is useful for building websites that display more personal or individualized data. The following code snippet is an example on how to acquire authorized tokens for other users. Before the redirect URI will work, you will have to add it to your client settings at https://develop.battle.net/access:

package main

import (
  "context"
  "encoding/json"
  "fmt"
  "log"
  "net/http"

  "github.com/FuzzyStatic/blizzard"
  "github.com/FuzzyStatic/blizzard/oauth"
  "golang.org/x/oauth2"
)

var (
  cfg   oauth2.Config
  blizz *blizzard.Client
)

// Homepage
func HomePage(w http.ResponseWriter, r *http.Request) {
  fmt.Println("Homepage Hit!")
  u := cfg.AuthCodeURL("my_random_state")
  http.Redirect(w, r, u, http.StatusFound)
}

// Authorize
func Authorize(w http.ResponseWriter, r *http.Request) {
  err := r.ParseForm()
  if err != nil {
    http.Error(w, err.Error(), http.StatusInternalServerError)
    return
  }

  state := r.Form.Get("state")
  if state != "my_random_state" {
    http.Error(w, "State invalid", http.StatusBadRequest)
    return
  }

  code := r.Form.Get("code")
  if code == "" {
    http.Error(w, "Code not found", http.StatusBadRequest)
    return
  }

  token, err := cfg.Exchange(context.Background(), code)
  if err != nil {
    http.Error(w, err.Error(), http.StatusInternalServerError)
    return
  }

  e := json.NewEncoder(w)
  e.SetIndent("", "  ")
  err = e.Encode(*token)
  if err != nil {
    http.Error(w, err.Error(), http.StatusInternalServerError)
    return
  }

  dat1, _, err := blizz.UserInfoHeader(token)
  if err != nil {
    http.Error(w, err.Error(), http.StatusInternalServerError)
    return
  }

  fmt.Printf("%+v\n", dat1)

  dat2, _, err := blizz.WoWUserCharacters(token)
  if err != nil {
    http.Error(w, err.Error(), http.StatusInternalServerError)
    return
  }

  fmt.Printf("%+v\n", dat2)
}

func main() {
  blizz = blizzard.NewClient("client_id", "client_secret", blizzard.US, blizzard.EnUS)
  cfg = blizz.AuthorizeConfig("http://<mydomain>:9094/oauth2", oauth.ProfileD3, oauth.ProfileSC2, oauth.ProfileWoW)

  http.HandleFunc("/", HomePage)
  http.HandleFunc("/oauth2", Authorize)

  // We start up our Client on port 9094
  log.Println("Client is running at 9094 port.")
  log.Fatal(http.ListenAndServe(":9094", nil))
}

Documentation

See the Blizzard API reference and the godoc for all the different datasets that can be acquired.

Special Thanks

Thanks to JSON-to-Go for making JSON to Go structure creation simple.

Documentation

Overview

Package blizzard is a client library designed to make calling and processing Blizzard Game APIs simple

Index

Constants

View Source
const (
	EnUS = Locale("en_US")
	EsMX = Locale("es_MX")
	PtBR = Locale("pt_BR")
	EnGB = Locale("en_GB")
	EsES = Locale("es_ES")
	FrFR = Locale("fr_FR")
	RuRU = Locale("ru_RU")
	DeDE = Locale("de_DE")
	PtPT = Locale("pt_PT")
	ItIT = Locale("it_IT")
	KoKR = Locale("ko_KR")
	ZhTW = Locale("zh_TW")
	ZhCN = Locale("zh_CN")
)

Locale constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client regional API URLs, locale, client ID, client secret

func NewClient

func NewClient(clientID, clientSecret string, region Region, locale Locale) *Client

NewClient create new Blizzard structure. This structure will be used to acquire your access token and make API calls.

func (*Client) AuthorizeConfig

func (c *Client) AuthorizeConfig(redirectURI string, profiles ...oauth.Profile) oauth2.Config

AuthorizeConfig returns OAuth2 config

func (*Client) ClassicWoWCreature

func (c *Client) ClassicWoWCreature(creatureID int) (*wowcgd.Creature, []byte, error)

ClassicWoWCreature returns a creature type by ID.

func (*Client) ClassicWoWCreatureDisplayMedia

func (c *Client) ClassicWoWCreatureDisplayMedia(creatureDisplayID int) (*wowcgd.CreatureDisplayMedia, []byte, error)

ClassicWoWCreatureDisplayMedia returns media for a creature display by ID.

func (*Client) ClassicWoWCreatureFamiliesIndex

func (c *Client) ClassicWoWCreatureFamiliesIndex() (*wowcgd.CreatureFamiliesIndex, []byte, error)

ClassicWoWCreatureFamiliesIndex returns an index of creature families.

func (*Client) ClassicWoWCreatureFamily

func (c *Client) ClassicWoWCreatureFamily(creatureFamilyID int) (*wowcgd.CreatureFamily, []byte, error)

ClassicWoWCreatureFamily returns a creature family by ID.

func (*Client) ClassicWoWCreatureFamilyMedia

func (c *Client) ClassicWoWCreatureFamilyMedia(creatureFamilyID int) (*wowcgd.CreatureFamilyMedia, []byte, error)

ClassicWoWCreatureFamilyMedia returns media for a creature family by ID.

func (*Client) ClassicWoWCreatureType

func (c *Client) ClassicWoWCreatureType(creatureTypeID int) (*wowcgd.CreatureType, []byte, error)

ClassicWoWCreatureType returns a creature type by ID.

func (*Client) ClassicWoWCreatureTypesIndex

func (c *Client) ClassicWoWCreatureTypesIndex() (*wowcgd.CreatureTypesIndex, []byte, error)

ClassicWoWCreatureTypesIndex returns an index of creature types.

func (*Client) ClassicWoWGuildCrestBorderMedia

func (c *Client) ClassicWoWGuildCrestBorderMedia(borderID int) (*wowcgd.GuildCrestBorderMdedia, []byte, error)

ClassicWoWGuildCrestBorderMedia returns media for a guild crest border by ID

func (*Client) ClassicWoWGuildCrestComponentsIndex

func (c *Client) ClassicWoWGuildCrestComponentsIndex() (*wowcgd.GuildCrestComponentsIndex, []byte, error)

ClassicWoWGuildCrestComponentsIndex returns an index of guild crest media

func (*Client) ClassicWoWGuildCrestEmblemMedia

func (c *Client) ClassicWoWGuildCrestEmblemMedia(emblemID int) (*wowcgd.GuildCrestEmblemMdedia, []byte, error)

ClassicWoWGuildCrestEmblemMedia returns media for a guild crest emblem by ID

func (*Client) ClassicWoWItem

func (c *Client) ClassicWoWItem(itemID int) (*wowcgd.Item, []byte, error)

ClassicWoWItem returns an item by ID

func (*Client) ClassicWoWItemClass

func (c *Client) ClassicWoWItemClass(itemClassID int) (*wowcgd.ItemClass, []byte, error)

ClassicWoWItemClass returns an item class by ID

func (*Client) ClassicWoWItemClassesIndex

func (c *Client) ClassicWoWItemClassesIndex() (*wowcgd.ItemClassesIndex, []byte, error)

ClassicWoWItemClassesIndex returns an index of item classes

func (*Client) ClassicWoWItemMedia

func (c *Client) ClassicWoWItemMedia(itemID int) (*wowcgd.ItemMedia, []byte, error)

ClassicWoWItemMedia returns media for an item by ID

func (*Client) ClassicWoWItemSubclass

func (c *Client) ClassicWoWItemSubclass(itemClassID, itemSubclassID int) (*wowcgd.ItemSubclass, []byte, error)

ClassicWoWItemSubclass returns an item subclass by ID

func (*Client) ClassicWoWPlayableClass

func (c *Client) ClassicWoWPlayableClass(classID int) (*wowcgd.PlayableClass, []byte, error)

ClassicWoWPlayableClass returns a playable class by ID

func (*Client) ClassicWoWPlayableClassMedia

func (c *Client) ClassicWoWPlayableClassMedia(playableClassID int) (*wowcgd.PlayableClassMedia, []byte, error)

ClassicWoWPlayableClassMedia returns media for a playable class by ID

func (*Client) ClassicWoWPlayableClassesIndex

func (c *Client) ClassicWoWPlayableClassesIndex() (*wowcgd.PlayableClassesIndex, []byte, error)

ClassicWoWPlayableClassesIndex returns an index of playable classes

func (*Client) ClassicWoWPlayableRace

func (c *Client) ClassicWoWPlayableRace(raceID int) (*wowcgd.PlayableRace, []byte, error)

ClassicWoWPlayableRace returns a playable race by ID

func (*Client) ClassicWoWPlayableRacesIndex

func (c *Client) ClassicWoWPlayableRacesIndex() (*wowcgd.PlayableRacesIndex, []byte, error)

ClassicWoWPlayableRacesIndex returns an index of playable races

func (*Client) ClassicWoWPowerType

func (c *Client) ClassicWoWPowerType(powerTypeID int) (*wowcgd.PowerType, []byte, error)

ClassicWoWPowerType returns a power type by ID

func (*Client) ClassicWoWPowerTypesIndex

func (c *Client) ClassicWoWPowerTypesIndex() (*wowcgd.PowerTypesIndex, []byte, error)

ClassicWoWPowerTypesIndex returns an index of power types

func (*Client) D3Act

func (c *Client) D3Act(id int) (*d3c.Act, []byte, error)

D3Act returns information about act based on ID

func (*Client) D3ActIndex

func (c *Client) D3ActIndex() (*d3c.ActIndex, []byte, error)

D3ActIndex returns an index of acts

func (*Client) D3Barbarian

func (c *Client) D3Barbarian() (*d3c.Hero, []byte, error)

D3Barbarian returns barbarian data

func (*Client) D3BarbarianSkill

func (c *Client) D3BarbarianSkill(skillSlug string) (*d3c.Skill, []byte, error)

D3BarbarianSkill returns barbarian skill data

func (*Client) D3Blacksmith

func (c *Client) D3Blacksmith() (*d3c.Artisan, []byte, error)

D3Blacksmith returns blacksmith data

func (*Client) D3BlacksmithRecipe

func (c *Client) D3BlacksmithRecipe(recipeSlug string) (*d3c.Recipe, []byte, error)

D3BlacksmithRecipe returns blacksmith recipe data

func (*Client) D3Crusader

func (c *Client) D3Crusader() (*d3c.Hero, []byte, error)

D3Crusader returns crusader data

func (*Client) D3CrusaderSkill

func (c *Client) D3CrusaderSkill(skillSlug string) (*d3c.Skill, []byte, error)

D3CrusaderSkill returns crusader skill data

func (*Client) D3DemonHunter

func (c *Client) D3DemonHunter() (*d3c.Hero, []byte, error)

D3DemonHunter returns demon hunter data

func (*Client) D3DemonHunterSkill

func (c *Client) D3DemonHunterSkill(skillSlug string) (*d3c.Skill, []byte, error)

D3DemonHunterSkill returns demon hunter skill data

func (*Client) D3Enchantress

func (c *Client) D3Enchantress() (*d3c.Follower, []byte, error)

D3Enchantress returns enchantress data

func (*Client) D3Era

func (c *Client) D3Era(eraID int) (*d3gd.Era, []byte, error)

D3Era returns season data

func (*Client) D3EraIndex

func (c *Client) D3EraIndex() (*d3gd.EraIndex, []byte, error)

D3EraIndex returns an index of seasons

func (*Client) D3EraLeaderboardBarbarian

func (c *Client) D3EraLeaderboardBarbarian(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardBarbarian returns barbarian leaderboard data for season

func (*Client) D3EraLeaderboardCrusader

func (c *Client) D3EraLeaderboardCrusader(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardCrusader returns crusader leaderboard data for season

func (*Client) D3EraLeaderboardDemonHunter

func (c *Client) D3EraLeaderboardDemonHunter(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardDemonHunter returns barbarian leaderboard data for season

func (*Client) D3EraLeaderboardHardcoreBarbarian

func (c *Client) D3EraLeaderboardHardcoreBarbarian(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardHardcoreBarbarian returns hardcore barbarian leaderboard data for season

func (*Client) D3EraLeaderboardHardcoreCrusader

func (c *Client) D3EraLeaderboardHardcoreCrusader(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardHardcoreCrusader returns hardcore crusader leaderboard data for season

func (*Client) D3EraLeaderboardHardcoreDemonHunter

func (c *Client) D3EraLeaderboardHardcoreDemonHunter(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardHardcoreDemonHunter returns hardcore demon hunter leaderboard data for season

func (*Client) D3EraLeaderboardHardcoreMonk

func (c *Client) D3EraLeaderboardHardcoreMonk(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardHardcoreMonk returns hardcore monk leaderboard data for season

func (*Client) D3EraLeaderboardHardcoreNecromancer

func (c *Client) D3EraLeaderboardHardcoreNecromancer(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardHardcoreNecromancer returns hardcore necromancer leaderboard data for season

func (*Client) D3EraLeaderboardHardcoreTeam2

func (c *Client) D3EraLeaderboardHardcoreTeam2(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardHardcoreTeam2 returns hardcore 2 team leaderboard data for season

func (*Client) D3EraLeaderboardHardcoreTeam3

func (c *Client) D3EraLeaderboardHardcoreTeam3(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardHardcoreTeam3 returns hardcore 2 team leaderboard data for season

func (*Client) D3EraLeaderboardHardcoreTeam4

func (c *Client) D3EraLeaderboardHardcoreTeam4(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardHardcoreTeam4 returns hardcore 4 team leaderboard data for season

func (*Client) D3EraLeaderboardHardcoreWitchDoctor

func (c *Client) D3EraLeaderboardHardcoreWitchDoctor(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardHardcoreWitchDoctor returns hardcore witch doctor leaderboard data for season

func (*Client) D3EraLeaderboardHardcoreWizard

func (c *Client) D3EraLeaderboardHardcoreWizard(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardHardcoreWizard returns hardcore wizard leaderboard data for season

func (*Client) D3EraLeaderboardMonk

func (c *Client) D3EraLeaderboardMonk(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardMonk returns monk leaderboard data for season

func (*Client) D3EraLeaderboardNecromancer

func (c *Client) D3EraLeaderboardNecromancer(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardNecromancer returns necromancer leaderboard data for season

func (*Client) D3EraLeaderboardTeam2

func (c *Client) D3EraLeaderboardTeam2(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardTeam2 returns 2 team leaderboard data for season

func (*Client) D3EraLeaderboardTeam3

func (c *Client) D3EraLeaderboardTeam3(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardTeam3 returns 3 team leaderboard data for season

func (*Client) D3EraLeaderboardTeam4

func (c *Client) D3EraLeaderboardTeam4(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardTeam4 returns 4 team leaderboard data for season

func (*Client) D3EraLeaderboardWitchDoctor

func (c *Client) D3EraLeaderboardWitchDoctor(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardWitchDoctor returns witch doctor leaderboard data for season

func (*Client) D3EraLeaderboardWizard

func (c *Client) D3EraLeaderboardWizard(eraID int) (*d3gd.Leaderboard, []byte, error)

D3EraLeaderboardWizard returns wizard leaderboard data for season

func (*Client) D3Item

func (c *Client) D3Item(itemSlug, itemID string) (*d3c.Item, []byte, error)

D3Item returns item data

func (*Client) D3ItemType

func (c *Client) D3ItemType(itemTypeSlug string) (*d3c.ItemType, []byte, error)

D3ItemType returns item type data

func (*Client) D3ItemTypeIndex

func (c *Client) D3ItemTypeIndex() (*d3c.ItemTypeIndex, []byte, error)

D3ItemTypeIndex returns an index of item types

func (*Client) D3Jeweler

func (c *Client) D3Jeweler() (*d3c.Artisan, []byte, error)

D3Jeweler returns jeweler data

func (*Client) D3JewelerRecipe

func (c *Client) D3JewelerRecipe(recipeSlug string) (*d3c.Recipe, []byte, error)

D3JewelerRecipe returns jeweler recipe data

func (*Client) D3Monk

func (c *Client) D3Monk() (*d3c.Hero, []byte, error)

D3Monk returns monk data

func (*Client) D3MonkSkill

func (c *Client) D3MonkSkill(skillSlug string) (*d3c.Skill, []byte, error)

D3MonkSkill returns monk skill data

func (*Client) D3Mystic

func (c *Client) D3Mystic() (*d3c.Artisan, []byte, error)

D3Mystic returns mystic data

func (*Client) D3Necromancer

func (c *Client) D3Necromancer() (*d3c.Hero, []byte, error)

D3Necromancer returns necromancer data

func (*Client) D3NecromancerSkill

func (c *Client) D3NecromancerSkill(skillSlug string) (*d3c.Skill, []byte, error)

D3NecromancerSkill returns necromancer skill data

func (*Client) D3Profile

func (c *Client) D3Profile(account string) (*d3c.Profile, []byte, error)

D3Profile returns profile data Formats accepted: Player-1234 or Player#1234

func (*Client) D3ProfileHero

func (c *Client) D3ProfileHero(account string, heroID int) (*d3c.ProfileHero, []byte, error)

D3ProfileHero returns profile's hero data Formats accepted: Player-1234 or Player#1234

func (*Client) D3ProfileHeroFollowerItems

func (c *Client) D3ProfileHeroFollowerItems(account string, heroID int) (*d3c.ProfileHeroFollowerItems, []byte, error)

D3ProfileHeroFollowerItems returns profile's hero's follower item data Formats accepted: Player-1234 or Player#1234

func (*Client) D3ProfileHeroItems

func (c *Client) D3ProfileHeroItems(account string, heroID int) (*d3c.ProfileHeroItems, []byte, error)

D3ProfileHeroItems returns profile's hero's item data Formats accepted: Player-1234 or Player#1234

func (*Client) D3Scoundrel

func (c *Client) D3Scoundrel() (*d3c.Follower, []byte, error)

D3Scoundrel returns scoundrel data

func (*Client) D3Season

func (c *Client) D3Season(seasonID int) (*d3gd.Season, []byte, error)

D3Season returns season data

func (*Client) D3SeasonIndex

func (c *Client) D3SeasonIndex() (*d3gd.SeasonIndex, []byte, error)

D3SeasonIndex returns an index of seasons

func (*Client) D3SeasonLeaderboard

func (c *Client) D3SeasonLeaderboard(seasonID int, leaderboard string) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboard returns leaderboard data for season and leaderboard

func (*Client) D3SeasonLeaderboardAchievementPoints

func (c *Client) D3SeasonLeaderboardAchievementPoints(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardAchievementPoints returns achievement points leaderboard data for season

func (*Client) D3SeasonLeaderboardBarbarian

func (c *Client) D3SeasonLeaderboardBarbarian(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardBarbarian returns barbarian leaderboard data for season

func (*Client) D3SeasonLeaderboardCrusader

func (c *Client) D3SeasonLeaderboardCrusader(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardCrusader returns crusader leaderboard data for season

func (*Client) D3SeasonLeaderboardDemonHunter

func (c *Client) D3SeasonLeaderboardDemonHunter(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardDemonHunter returns barbarian leaderboard data for season

func (*Client) D3SeasonLeaderboardHardcoreBarbarian

func (c *Client) D3SeasonLeaderboardHardcoreBarbarian(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardHardcoreBarbarian returns hardcore barbarian leaderboard data for season

func (*Client) D3SeasonLeaderboardHardcoreCrusader

func (c *Client) D3SeasonLeaderboardHardcoreCrusader(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardHardcoreCrusader returns hardcore crusader leaderboard data for season

func (*Client) D3SeasonLeaderboardHardcoreDemonHunter

func (c *Client) D3SeasonLeaderboardHardcoreDemonHunter(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardHardcoreDemonHunter returns hardcore demon hunter leaderboard data for season

func (*Client) D3SeasonLeaderboardHardcoreMonk

func (c *Client) D3SeasonLeaderboardHardcoreMonk(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardHardcoreMonk returns hardcore monk leaderboard data for season

func (*Client) D3SeasonLeaderboardHardcoreNecromancer

func (c *Client) D3SeasonLeaderboardHardcoreNecromancer(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardHardcoreNecromancer returns hardcore necromancer leaderboard data for season

func (*Client) D3SeasonLeaderboardHardcoreTeam2

func (c *Client) D3SeasonLeaderboardHardcoreTeam2(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardHardcoreTeam2 returns hardcore 2 team leaderboard data for season

func (*Client) D3SeasonLeaderboardHardcoreTeam3

func (c *Client) D3SeasonLeaderboardHardcoreTeam3(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardHardcoreTeam3 returns hardcore 2 team leaderboard data for season

func (*Client) D3SeasonLeaderboardHardcoreTeam4

func (c *Client) D3SeasonLeaderboardHardcoreTeam4(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardHardcoreTeam4 returns hardcore 4 team leaderboard data for season

func (*Client) D3SeasonLeaderboardHardcoreWitchDoctor

func (c *Client) D3SeasonLeaderboardHardcoreWitchDoctor(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardHardcoreWitchDoctor returns hardcore witch doctor leaderboard data for season

func (*Client) D3SeasonLeaderboardHardcoreWizard

func (c *Client) D3SeasonLeaderboardHardcoreWizard(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardHardcoreWizard returns hardcore wizard leaderboard data for season

func (*Client) D3SeasonLeaderboardMonk

func (c *Client) D3SeasonLeaderboardMonk(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardMonk returns monk leaderboard data for season

func (*Client) D3SeasonLeaderboardNecromancer

func (c *Client) D3SeasonLeaderboardNecromancer(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardNecromancer returns necromancer leaderboard data for season

func (*Client) D3SeasonLeaderboardTeam2

func (c *Client) D3SeasonLeaderboardTeam2(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardTeam2 returns 2 team leaderboard data for season

func (*Client) D3SeasonLeaderboardTeam3

func (c *Client) D3SeasonLeaderboardTeam3(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardTeam3 returns 3 team leaderboard data for season

func (*Client) D3SeasonLeaderboardTeam4

func (c *Client) D3SeasonLeaderboardTeam4(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardTeam4 returns 4 team leaderboard data for season

func (*Client) D3SeasonLeaderboardWitchDoctor

func (c *Client) D3SeasonLeaderboardWitchDoctor(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardWitchDoctor returns witch doctor leaderboard data for season

func (*Client) D3SeasonLeaderboardWizard

func (c *Client) D3SeasonLeaderboardWizard(seasonID int) (*d3gd.Leaderboard, []byte, error)

D3SeasonLeaderboardWizard returns wizard leaderboard data for season

func (*Client) D3Templar

func (c *Client) D3Templar() (*d3c.Follower, []byte, error)

D3Templar returns templar data

func (*Client) D3WitchDoctor

func (c *Client) D3WitchDoctor() (*d3c.Hero, []byte, error)

D3WitchDoctor returns witch doctor data

func (*Client) D3WitchDoctorSkill

func (c *Client) D3WitchDoctorSkill(skillSlug string) (*d3c.Skill, []byte, error)

D3WitchDoctorSkill returns witch doctor skill data

func (*Client) D3Wizard

func (c *Client) D3Wizard() (*d3c.Hero, []byte, error)

D3Wizard returns wizard data

func (*Client) D3WizardSkill

func (c *Client) D3WizardSkill(skillSlug string) (*d3c.Skill, []byte, error)

D3WizardSkill returns wizard skill data

func (*Client) HSCardByIDOrSlug

func (c *Client) HSCardByIDOrSlug(idOrSlug string) (*hsgd.Card, []byte, error)

HSCardByIDOrSlug returns card by ID or slug. For more information about the search parameters, see the Hearthstone Guide.

func (*Client) HSCards

func (c *Client) HSCards(setSlug, classSlug, raritySlug, typeSlug, minionTypeSlug, keywordSlug, textFilter string,
	manaCost, attack, health []int, page, pageSize int,
	collectiblility hsgd.Collectibility, sort hsgd.Sort, order hsgd.Order) (*hsgd.CardSearch, []byte, error)

HSCards returns an up-to-date list of all cards matching the search criteria. Input values left blank, 0, or nil will return all values for the type. For more information about the search parameters, see the Hearthstone Guide.

func (*Client) HSCardsAll

func (c *Client) HSCardsAll() (*hsgd.CardSearch, []byte, error)

HSCardsAll returns an up-to-date list of all cards matching the search criteria. For more information about the search parameters, see the Hearthstone Guide.

func (*Client) HSDeck

func (c *Client) HSDeck(deckCode string) (*hsgd.Deck, []byte, error)

HSDeck Finds a deck by its deck code. For more information, see the Hearthstone Guide.

func (*Client) HSMetadata

func (c *Client) HSMetadata() (*hsgd.Metadata, []byte, error)

HSMetadata returns information about the categorization of cards. Metadata includes the card set, set group (for example, Standard or Year of the Dragon), rarity, class, card type, minion type, and keywords. For more information, see the Hearthstone Guide.

func (*Client) HSMetadataClasses

func (c *Client) HSMetadataClasses() (*[]hsgd.Class, []byte, error)

HSMetadataClasses returns information about class metadata. For more information, see the Hearthstone Guide.

func (*Client) HSMetadataKeywords

func (c *Client) HSMetadataKeywords() (*[]hsgd.Keyword, []byte, error)

HSMetadataKeywords returns information about keyword metadata. For more information, see the Hearthstone Guide.

func (*Client) HSMetadataMinionTypes

func (c *Client) HSMetadataMinionTypes() (*[]hsgd.MinionType, []byte, error)

HSMetadataMinionTypes returns information about minion type metadata. For more information, see the Hearthstone Guide.

func (*Client) HSMetadataRarities

func (c *Client) HSMetadataRarities() (*[]hsgd.Rarity, []byte, error)

HSMetadataRarities returns information about rarity metadata. For more information, see the Hearthstone Guide.

func (*Client) HSMetadataSetGroups

func (c *Client) HSMetadataSetGroups() (*[]hsgd.SetGroup, []byte, error)

HSMetadataSetGroups returns information about set group metadata. For more information, see the Hearthstone Guide.

func (*Client) HSMetadataSets

func (c *Client) HSMetadataSets() (*[]hsgd.Set, []byte, error)

HSMetadataSets returns information about set metadata. For more information, see the Hearthstone Guide.

func (*Client) HSMetadataTypes

func (c *Client) HSMetadataTypes() (*[]hsgd.Type, []byte, error)

HSMetadataTypes returns information about type metadata. For more information, see the Hearthstone Guide.

func (*Client) SC2LadderGrandmaster

func (c *Client) SC2LadderGrandmaster(region Region) (*sc2c.LadderGrandmaster, []byte, error)

SC2LadderGrandmaster returns SC2 ladder grandmaster for current season

func (*Client) SC2LadderSeason

func (c *Client) SC2LadderSeason(region Region) (*sc2c.LadderSeason, []byte, error)

SC2LadderSeason returns SC2 ladder current season

func (*Client) SC2LeagueData

func (c *Client) SC2LeagueData(seasonID int, queueID sc2gd.QueueID, teamType sc2gd.TeamType, leagueID sc2gd.LeagueID) (*sc2gd.League, []byte, error)

SC2LeagueData returns all SC2 league data from for seasonID, queue ID, team type, and league ID

func (*Client) SC2LegacyAchievements

func (c *Client) SC2LegacyAchievements(region Region) (*sc2c.LegacyAchievements, []byte, error)

SC2LegacyAchievements returns SC2 legacy achievements for region

func (*Client) SC2LegacyLadder

func (c *Client) SC2LegacyLadder(region Region, ladderID int) (*sc2c.LegacyLadder, []byte, error)

SC2LegacyLadder returns SC2 legacy ladder data

func (*Client) SC2LegacyProfile

func (c *Client) SC2LegacyProfile(region Region, realmID, profileID int) (*sc2c.LegacyProfile, []byte, error)

SC2LegacyProfile returns all SC2 legacy profile data

func (*Client) SC2LegacyProfileLadders

func (c *Client) SC2LegacyProfileLadders(region Region, realmID, profileID int) (*sc2c.LegacyProfileLadders, []byte, error)

SC2LegacyProfileLadders returns all SC2 legacy profile ladder data

func (*Client) SC2LegacyProfileMatches

func (c *Client) SC2LegacyProfileMatches(region Region, realmID, profileID int) (*sc2c.LegacyProfileMatches, []byte, error)

SC2LegacyProfileMatches returns all SC2 legacy profile matches data

func (*Client) SC2LegacyRewards

func (c *Client) SC2LegacyRewards(region Region) (*sc2c.LegacyRewards, []byte, error)

SC2LegacyRewards returns SC2 legacy rewards for region

func (*Client) SC2MetadataProfile

func (c *Client) SC2MetadataProfile(region Region, realmID, profileID int) (*sc2c.MetadataProfile, []byte, error)

SC2MetadataProfile returns all SC2 profile metadata

func (*Client) SC2Player

func (c *Client) SC2Player(accountID int) (*sc2c.Player, []byte, error)

SC2Player returns data about player using account ID

func (*Client) SC2Profile

func (c *Client) SC2Profile(region Region, realmID, profileID int) (*sc2c.Profile, []byte, error)

SC2Profile returns all SC2 profile data

func (*Client) SC2ProfileLadder

func (c *Client) SC2ProfileLadder(region Region, realmID, profileID, ladderID int) (*sc2c.Ladder, []byte, error)

SC2ProfileLadder returns SC2 profile ladder data

func (*Client) SC2ProfileLadderSummary

func (c *Client) SC2ProfileLadderSummary(region Region, realmID, profileID int) (*sc2c.LadderSummary, []byte, error)

SC2ProfileLadderSummary returns SC2 profile ladder summary

func (*Client) SC2StaticProfile

func (c *Client) SC2StaticProfile(region Region) (*sc2c.StaticProfile, []byte, error)

SC2StaticProfile returns all static SC2 profile data (achievements, categories, criteria, and rewards)

func (*Client) SetLocale

func (c *Client) SetLocale(locale Locale)

SetLocale changes the Locale of the client

func (*Client) SetRegion

func (c *Client) SetRegion(region Region)

SetRegion changes the Region of the client

func (*Client) Token

func (c *Client) Token() error

Token retrieves new OAuth2 Token

func (*Client) TokenValidation

func (c *Client) TokenValidation() (*oauth.TokenValidation, []byte, error)

TokenValidation verify that a given bearer token is valid and retrieve metadata about the token including the client_id used to create the token, expiration timestamp, and scopes granted to the token

func (*Client) UserInfoHeader

func (c *Client) UserInfoHeader(token *oauth2.Token) (*oauth.UserInfo, []byte, error)

UserInfoHeader teturns basic information about the user associated with the current bearer token

func (*Client) WoWAchievement

func (c *Client) WoWAchievement(achievementID int) (*wowgd.Achievement, []byte, error)

WoWAchievement returns an achievement category by ID.

func (*Client) WoWAchievementCategoriesIndex

func (c *Client) WoWAchievementCategoriesIndex() (*wowgd.AchievementCategoriesIndex, []byte, error)

WoWAchievementCategoriesIndex returns an index of achievement categories.

func (*Client) WoWAchievementCategory

func (c *Client) WoWAchievementCategory(achievementCategoryID int) (*wowgd.AchievementCategory, []byte, error)

WoWAchievementCategory returns an achievement category by ID.

func (*Client) WoWAchievementIndex

func (c *Client) WoWAchievementIndex() (*wowgd.AchievementIndex, []byte, error)

WoWAchievementIndex returns an index of achievements.

func (*Client) WoWAchievementMedia

func (c *Client) WoWAchievementMedia(achievementID int) (*wowgd.AchievementMedia, []byte, error)

WoWAchievementMedia returns media for an achievement by ID.

func (*Client) WoWAuctionData

func (c *Client) WoWAuctionData(realm string) ([]*wowc.AuctionData, error)

WoWAuctionData returns auction data for realm

func (*Client) WoWAuctionFiles

func (c *Client) WoWAuctionFiles(realm string) (*wowc.AuctionFiles, []byte, error)

WoWAuctionFiles returns list of auction URLs containing auction data

func (*Client) WoWAzeriteEssence

func (c *Client) WoWAzeriteEssence(azeriteEssenceID int) (*wowgd.AzeriteEssence, []byte, error)

WoWAzeriteEssence returns an azerite essence by ID.

func (*Client) WoWAzeriteEssenceIndex

func (c *Client) WoWAzeriteEssenceIndex() (*wowgd.AzeriteEssenceIndex, []byte, error)

WoWAzeriteEssenceIndex returns an index of azerite essences.

func (*Client) WoWAzeriteEssenceMedia

func (c *Client) WoWAzeriteEssenceMedia(azeriteEssenceID int) (*wowgd.AzeriteEssenceMedia, []byte, error)

WoWAzeriteEssenceMedia returns media for an azerite essence by ID.

func (*Client) WoWBoss

func (c *Client) WoWBoss(bossID int) (*wowc.Boss, []byte, error)

WoWBoss provides information about bosses. A "boss" in this context should be considered a boss encounter, which may include more than one NPC

func (*Client) WoWBossMasterList

func (c *Client) WoWBossMasterList() (*wowc.BossMasterList, []byte, error)

WoWBossMasterList returns a list of all supported bosses. A "boss" in this context should be considered a boss encounter, which may include more than one NPC

func (*Client) WoWChallengeModeRealmLeaderboard

func (c *Client) WoWChallengeModeRealmLeaderboard(realm string) (*wowc.ChallengeModeRealmLeaderboard, []byte, error)

WoWChallengeModeRealmLeaderboard returns data for all nine challenge mode maps (currently). The map field includes the current medal times for each dungeon. Each ladder provides data about each character that was part of each run. The character data includes the current cached specialization of the character while the member field includes the specialization of the character during the challenge mode run

func (*Client) WoWChallengeModeRegionLeaderboard

func (c *Client) WoWChallengeModeRegionLeaderboard() (*wowc.ChallengeModeRegionLeaderboard, []byte, error)

WoWChallengeModeRegionLeaderboard has the exact same data format as the realm leaderboards except there is no realm field. Instead, the response has the top 100 results gathered for each map for all of the available realm leaderboards in a region

func (*Client) WoWCharacterAchievements

func (c *Client) WoWCharacterAchievements() (*wowc.CharacterAchievements, []byte, error)

WoWCharacterAchievements returns a list of all achievements that characters can earn as well as the category structure and hierarchy

func (*Client) WoWCharacterAchievementsSummary

func (c *Client) WoWCharacterAchievementsSummary(realmSlug, characterName string) (*wowp.CharacterAchievementsSummary, []byte, error)

WoWCharacterAchievementsSummary returns a summary of the achievements a character has completed.

func (*Client) WoWCharacterAppearanceSummary

func (c *Client) WoWCharacterAppearanceSummary(realmSlug, characterName string) (*wowp.CharacterAppearanceSummary, []byte, error)

WoWCharacterAppearanceSummary returns a summary of a character's appearance settings.

func (*Client) WoWCharacterClasses

func (c *Client) WoWCharacterClasses() (*wowc.CharacterClasses, []byte, error)

WoWCharacterClasses returns a list of character classes

func (*Client) WoWCharacterCollectionsIndex

func (c *Client) WoWCharacterCollectionsIndex(realmSlug, characterName string) (*wowp.CharacterCollectionsIndex, []byte, error)

WoWCharacterCollectionsIndex returns an index of collection types for a character.

func (*Client) WoWCharacterEquipmentSummary

func (c *Client) WoWCharacterEquipmentSummary(realmSlug, characterName string) (*wowp.CharacterEquipmentSummary, []byte, error)

WoWCharacterEquipmentSummary returns a summary of the items equipped by a character.

func (*Client) WoWCharacterHunterPetsSummary

func (c *Client) WoWCharacterHunterPetsSummary(realmSlug, characterName string) (*wowp.CharacterHunterPetsSummary, []byte, error)

WoWCharacterHunterPetsSummary if the character is a hunter, returns a summary of the character's hunter pets. Otherwise, returns an HTTP 404 Not Found error.

func (*Client) WoWCharacterMediaSummary

func (c *Client) WoWCharacterMediaSummary(realmSlug, characterName string) (*wowp.CharacterMediaSummary, []byte, error)

WoWCharacterMediaSummary returns a summary of the media assets available for a character (such as an avatar render).

func (*Client) WoWCharacterMountsCollectionSummary

func (c *Client) WoWCharacterMountsCollectionSummary(realmSlug, characterName string) (*wowp.CharacterMountsCollectionSummary, []byte, error)

WoWCharacterMountsCollectionSummary returns a summary of the mounts a character has obtained.

func (*Client) WoWCharacterMythicKeystoneProfile

func (c *Client) WoWCharacterMythicKeystoneProfile(realmSlug, characterName string) (*wowp.CharacterMythicKeystoneProfile, []byte, error)

WoWCharacterMythicKeystoneProfile returns a Mythic Keystone Profile index for a character.

func (*Client) WoWCharacterMythicKeystoneProfileSeason

func (c *Client) WoWCharacterMythicKeystoneProfileSeason(realmSlug, characterName string, seasonID int) (*wowp.CharacterMythicKeystoneProfileSeason, []byte, error)

WoWCharacterMythicKeystoneProfileSeason returns a Mythic Keystone Profile index for a character. Note: this request returns a 404 for characters that have not completed a Mythic Keystone dungeon.

func (*Client) WoWCharacterPetsCollectionSummary

func (c *Client) WoWCharacterPetsCollectionSummary(realmSlug, characterName string) (*wowp.CharacterPetsCollectionSummary, []byte, error)

WoWCharacterPetsCollectionSummary returns a summary of the mounts a character has obtained.

func (*Client) WoWCharacterProfile

func (c *Client) WoWCharacterProfile(realm, characterName string, optionalFields []string) (*wowc.CharacterProfile, []byte, error)

WoWCharacterProfile is the primary way to access character information. This API can be used to fetch a single character at a time through an HTTP GET request to a URL describing the character profile resource. By default, these requests return a basic dataset, and each request can return zero or more additional fields. To access this API, craft a resource URL pointing to the desired character for which to retrieve information Optional field constants are prefixed with the word "FieldCharacter"

func (*Client) WoWCharacterProfileStatus

func (c *Client) WoWCharacterProfileStatus(realmSlug, characterName string) (*wowp.CharacterProfileStatus, []byte, error)

WoWCharacterProfileStatus returns the status and a unique ID for a character. A client should delete information about a character from their application if any of the following conditions occur: * an HTTP 404 Not Found error is returned * the is_valid value is false * the returned character ID doesn't match the previously recorded value for the character The following example illustrates how to use this endpoint: 1. A client requests and stores information about a character, including its unique character ID and the timestamp of the request. 2. After 30 days, the client makes a request to the status endpoint to verify if the character information is still valid. 3. If character cannot be found, is not valid, or the characters IDs do not match, the client removes the information from their application. 4. If the character is valid and the character IDs match, the client retains the data for another 30 days.

func (*Client) WoWCharacterProfileSummary

func (c *Client) WoWCharacterProfileSummary(realmSlug, characterName string) (*wowp.CharacterProfileSummary, []byte, error)

WoWCharacterProfileSummary returns a profile summary for a character.

func (*Client) WoWCharacterPvPBracketStatistics

func (c *Client) WoWCharacterPvPBracketStatistics(realmSlug, characterName string, pvpBracket wowp.Bracket) (*wowp.CharacterPvPBracketStatistics, []byte, error)

WoWCharacterPvPBracketStatistics returns the PvP bracket statistics for a character.

func (*Client) WoWCharacterPvPSummary

func (c *Client) WoWCharacterPvPSummary(realmSlug, characterName string) (*wowp.CharacterPvPSummary, []byte, error)

WoWCharacterPvPSummary returns a PvP summary for a character.

func (*Client) WoWCharacterRaces

func (c *Client) WoWCharacterRaces() (*wowc.CharacterRaces, []byte, error)

WoWCharacterRaces returns a list of races and their associated faction, name, unique ID, and skin

func (*Client) WoWCharacterReputationsSummary

func (c *Client) WoWCharacterReputationsSummary(realmSlug, characterName string) (*wowp.CharacterReputationsSummary, []byte, error)

WoWCharacterReputationsSummary returns a summary of a character's reputations.

func (*Client) WoWCharacterSpecializationsSummary

func (c *Client) WoWCharacterSpecializationsSummary(realmSlug, characterName string) (*wowp.CharacterSpecializationsSummary, []byte, error)

WoWCharacterSpecializationsSummary returns a summary of a character's specializations.

func (*Client) WoWCharacterStatisticsSummary

func (c *Client) WoWCharacterStatisticsSummary(realmSlug, characterName string) (*wowp.CharacterStatisticsSummary, []byte, error)

WoWCharacterStatisticsSummary returns a statistics summary for a character.

func (*Client) WoWCharacterTitlesSummary

func (c *Client) WoWCharacterTitlesSummary(realmSlug, characterName string) (*wowp.CharacterTitlesSummary, []byte, error)

WoWCharacterTitlesSummary returns a summary of titles a character has obtained.

func (*Client) WoWConnectedRealm

func (c *Client) WoWConnectedRealm(connectedRealmID int) (*wowgd.ConnectedRealm, []byte, error)

WoWConnectedRealm returns a single connected realm by ID

func (*Client) WoWConnectedRealmIndex

func (c *Client) WoWConnectedRealmIndex() (*wowgd.ConnectedRealmIndex, []byte, error)

WoWConnectedRealmIndex returns an index of connected realms

func (*Client) WoWCreature

func (c *Client) WoWCreature(creatureID int) (*wowgd.Creature, []byte, error)

WoWCreature returns a creature type by ID.

func (*Client) WoWCreatureDisplayMedia

func (c *Client) WoWCreatureDisplayMedia(creatureDisplayID int) (*wowgd.CreatureDisplayMedia, []byte, error)

WoWCreatureDisplayMedia returns media for a creature display by ID.

func (*Client) WoWCreatureFamiliesIndex

func (c *Client) WoWCreatureFamiliesIndex() (*wowgd.CreatureFamiliesIndex, []byte, error)

WoWCreatureFamiliesIndex returns an index of creature families.

func (*Client) WoWCreatureFamily

func (c *Client) WoWCreatureFamily(creatureFamilyID int) (*wowgd.CreatureFamily, []byte, error)

WoWCreatureFamily returns a creature family by ID.

func (*Client) WoWCreatureFamilyMedia

func (c *Client) WoWCreatureFamilyMedia(creatureFamilyID int) (*wowgd.CreatureFamilyMedia, []byte, error)

WoWCreatureFamilyMedia returns media for a creature family by ID.

func (*Client) WoWCreatureType

func (c *Client) WoWCreatureType(creatureTypeID int) (*wowgd.CreatureType, []byte, error)

WoWCreatureType returns a creature type by ID.

func (*Client) WoWCreatureTypesIndex

func (c *Client) WoWCreatureTypesIndex() (*wowgd.CreatureTypesIndex, []byte, error)

WoWCreatureTypesIndex returns an index of creature types.

func (*Client) WoWGuild

func (c *Client) WoWGuild(realmSlug, nameSlug string) (*wowp.Guild, []byte, error)

WoWGuild returns a single guild by its name and realm.

func (*Client) WoWGuildAchievements

func (c *Client) WoWGuildAchievements(realmSlug, nameSlug string) (*wowp.GuildAchievements, []byte, error)

WoWGuildAchievements returns a single guild's achievements by name and realm.

func (*Client) WoWGuildCrestBorderMedia

func (c *Client) WoWGuildCrestBorderMedia(borderID int) (*wowgd.GuildCrestBorderMdedia, []byte, error)

WoWGuildCrestBorderMedia returns media for a guild crest border by ID.

func (*Client) WoWGuildCrestComponentsIndex

func (c *Client) WoWGuildCrestComponentsIndex() (*wowgd.GuildCrestComponentsIndex, []byte, error)

WoWGuildCrestComponentsIndex returns an index of guild crest media.

func (*Client) WoWGuildCrestEmblemMedia

func (c *Client) WoWGuildCrestEmblemMedia(emblemID int) (*wowgd.GuildCrestEmblemMdedia, []byte, error)

WoWGuildCrestEmblemMedia returns media for a guild crest emblem by ID.

func (*Client) WoWGuildPerks

func (c *Client) WoWGuildPerks() (*wowc.GuildPerks, []byte, error)

WoWGuildPerks returns a list of all guild achievements as well as the category structure and hierarchy

func (*Client) WoWGuildProfile

func (c *Client) WoWGuildProfile(realm, guildName string, optionalFields []string) (*wowc.GuildProfile, []byte, error)

WoWGuildProfile is the primary way to access guild information. This API can fetch a single guild at a time through an HTTP GET request to a URL describing the guild profile resource. By default, these requests return a basic dataset and each request can retrieve zero or more additional fields. Although this endpoint has no required query string parameters, requests can optionally pass the fields query string parameter to indicate that one or more of the optional datasets is to be retrieved. Those additional fields are listed in the method titled "Optional Fields" Optional field constants are prefixed with the word "FieldGuild"

func (*Client) WoWGuildRewards

func (c *Client) WoWGuildRewards() (*wowc.GuildRewards, []byte, error)

WoWGuildRewards provides a list of all guild rewards

func (*Client) WoWGuildRoster

func (c *Client) WoWGuildRoster(realmSlug, nameSlug string) (*wowp.GuildRoster, []byte, error)

WoWGuildRoster returns a single guild's roster by its name and realm.

func (*Client) WoWItem

func (c *Client) WoWItem(itemID int) (*wowgd.Item, []byte, error)

WoWItem returns an item by ID.

func (*Client) WoWItemClass

func (c *Client) WoWItemClass(itemClassID int) (*wowgd.ItemClass, []byte, error)

WoWItemClass returns an item class by ID.

func (*Client) WoWItemClasses

func (c *Client) WoWItemClasses() (*wowc.ItemClasses, []byte, error)

WoWItemClasses returns a list of item classes

func (*Client) WoWItemClassesIndex

func (c *Client) WoWItemClassesIndex() (*wowgd.ItemClassesIndex, []byte, error)

WoWItemClassesIndex returns an index of item classes.

func (*Client) WoWItemMedia

func (c *Client) WoWItemMedia(itemID int) (*wowgd.ItemMedia, []byte, error)

WoWItemMedia returns media for an item by ID.

func (*Client) WoWItemSet

func (c *Client) WoWItemSet(setID int) (*wowc.ItemSet, []byte, error)

WoWItemSet provides detailed item information, including item set information

func (*Client) WoWItemSubclass

func (c *Client) WoWItemSubclass(itemClassID, itemSubclassID int) (*wowgd.ItemSubclass, []byte, error)

WoWItemSubclass returns an item subclass by ID.

func (*Client) WoWMount

func (c *Client) WoWMount(mountID int) (*wowgd.Mount, []byte, error)

WoWMount returns a mount by ID.

func (*Client) WoWMountIndex

func (c *Client) WoWMountIndex() (*wowgd.MountIndex, []byte, error)

WoWMountIndex returns an index of mounts.

func (*Client) WoWMountMasterList

func (c *Client) WoWMountMasterList() (*wowc.MountMasterList, []byte, error)

WoWMountMasterList returns a list of all supported mounts

func (*Client) WoWMythicKeystoneAffix

func (c *Client) WoWMythicKeystoneAffix(keystoneAffixID int) (*wowgd.MythicKeystoneAffix, []byte, error)

WoWMythicKeystoneAffix returns a single connected realm by ID

func (*Client) WoWMythicKeystoneAffixIndex

func (c *Client) WoWMythicKeystoneAffixIndex() (*wowgd.MythicKeystoneAffixIndex, []byte, error)

WoWMythicKeystoneAffixIndex returns an index of Keystone affixes

func (*Client) WoWMythicKeystoneDungeon

func (c *Client) WoWMythicKeystoneDungeon(dungeonID int) (*wowgd.MythicKeystoneDungeon, []byte, error)

WoWMythicKeystoneDungeon returns a Mythic Keystone dungeon by ID

func (*Client) WoWMythicKeystoneDungeonIndex

func (c *Client) WoWMythicKeystoneDungeonIndex() (*wowgd.MythicKeystoneDungeonIndex, []byte, error)

WoWMythicKeystoneDungeonIndex returns an index of Mythic Keystone dungeons

func (*Client) WoWMythicKeystoneIndex

func (c *Client) WoWMythicKeystoneIndex() (*wowgd.MythicKeystoneIndex, []byte, error)

WoWMythicKeystoneIndex returns n index of links to other documents related to Mythic Keystone dungeons

func (*Client) WoWMythicKeystoneLeaderboard

func (c *Client) WoWMythicKeystoneLeaderboard(connectedRealmID, dungeonID, period int) (*wowgd.MythicKeystoneLeaderboard, []byte, error)

WoWMythicKeystoneLeaderboard returns a weekly Mythic Keystone Leaderboard by period

func (*Client) WoWMythicKeystoneLeaderboardIndex

func (c *Client) WoWMythicKeystoneLeaderboardIndex(connectedRealmID int) (*wowgd.MythicKeystoneLeaderboardIndex, []byte, error)

WoWMythicKeystoneLeaderboardIndex returns an index of Mythic Keystone Leaderboard dungeon instances for a connected realm

func (*Client) WoWMythicKeystonePeriod

func (c *Client) WoWMythicKeystonePeriod(periodID int) (*wowgd.MythicKeystonePeriod, []byte, error)

WoWMythicKeystonePeriod returns a Mythic Keystone period by ID

func (*Client) WoWMythicKeystonePeriodIndex

func (c *Client) WoWMythicKeystonePeriodIndex() (*wowgd.MythicKeystonePeriodIndex, []byte, error)

WoWMythicKeystonePeriodIndex returns an index of Mythic Keystone periods

func (*Client) WoWMythicKeystoneSeason

func (c *Client) WoWMythicKeystoneSeason(seasonID int) (*wowgd.MythicKeystoneSeason, []byte, error)

WoWMythicKeystoneSeason returns a Mythic Keystone season by ID

func (*Client) WoWMythicKeystoneSeasonIndex

func (c *Client) WoWMythicKeystoneSeasonIndex() (*wowgd.MythicKeystoneSeasonIndex, []byte, error)

WoWMythicKeystoneSeasonIndex returns an index of Mythic Keystone seasons

func (*Client) WoWMythicRaidLeaderboard

func (c *Client) WoWMythicRaidLeaderboard(raid, faction string) (*wowgd.MythicRaidLeaderboard, []byte, error)

WoWMythicRaidLeaderboard returns the leaderboard for a given raid and faction

func (*Client) WoWPVPLeaderboard

func (c *Client) WoWPVPLeaderboard(bracket string) (*wowc.PVPLeaderboard, []byte, error)

WoWPVPLeaderboard provides leaderboard information for the 2v2, 3v3, 5v5, and Rated Battleground leaderboards

func (*Client) WoWPet

func (c *Client) WoWPet(petID int) (*wowgd.Pet, []byte, error)

WoWPet returns a pet by ID.

func (*Client) WoWPetAbility

func (c *Client) WoWPetAbility(abilityID int) (*wowc.PetAbility, []byte, error)

WoWPetAbility returns data about a individual battle pet ability ID. This resource does not provide ability tooltips

func (*Client) WoWPetIndex

func (c *Client) WoWPetIndex() (*wowgd.PetIndex, []byte, error)

WoWPetIndex returns an index of pets.

func (*Client) WoWPetMasterList

func (c *Client) WoWPetMasterList() (*wowc.PetMasterList, []byte, error)

WoWPetMasterList returns a list of all supported battle and vanity pets

func (*Client) WoWPetSpecies

func (c *Client) WoWPetSpecies(speciesID int) (*wowc.PetSpecies, []byte, error)

WoWPetSpecies returns data about an individual pet species. Use pets as the field value in a character profile request to get species IDs. Each species also has data about its six abilities

func (*Client) WoWPetStats

func (c *Client) WoWPetStats(speciesID, level, breedID, qualityID int) (*wowc.PetStats, []byte, error)

WoWPetStats returns detailed information about a given species of pet

func (*Client) WoWPetTypes

func (c *Client) WoWPetTypes() (*wowc.PetTypes, []byte, error)

WoWPetTypes returns a list of the different battle pet types, including what they are strong and weak against

func (*Client) WoWPlayableClass

func (c *Client) WoWPlayableClass(classID int) (*wowgd.PlayableClass, []byte, error)

WoWPlayableClass returns a playable class by ID

func (*Client) WoWPlayableClassPvPTalentSlots

func (c *Client) WoWPlayableClassPvPTalentSlots(classID int) (*wowgd.PlayableClassPvPTalentSlots, []byte, error)

WoWPlayableClassPvPTalentSlots returns the PvP talent slots for a playable class by ID

func (*Client) WoWPlayableClassesIndex

func (c *Client) WoWPlayableClassesIndex() (*wowgd.PlayableClassesIndex, []byte, error)

WoWPlayableClassesIndex returns an index of playable classes

func (*Client) WoWPlayableRace

func (c *Client) WoWPlayableRace(raceID int) (*wowgd.PlayableRace, []byte, error)

WoWPlayableRace returns a race by ID.

func (*Client) WoWPlayableRacesIndex

func (c *Client) WoWPlayableRacesIndex() (*wowgd.PlayableRacesIndex, []byte, error)

WoWPlayableRacesIndex returns an index of races.

func (*Client) WoWPlayableSpecialization

func (c *Client) WoWPlayableSpecialization(specID int) (*wowgd.PlayableSpecialization, []byte, error)

WoWPlayableSpecialization returns a playable specialization by ID.

func (*Client) WoWPlayableSpecializationIndex

func (c *Client) WoWPlayableSpecializationIndex() (*wowgd.PlayableSpecializationIndex, []byte, error)

WoWPlayableSpecializationIndex returns an index of playable specializations.

func (*Client) WoWPowerType

func (c *Client) WoWPowerType(powerTypeID int) (*wowgd.PowerType, []byte, error)

WoWPowerType returns a power type by ID.

func (*Client) WoWPowerTypesIndex

func (c *Client) WoWPowerTypesIndex() (*wowgd.PowerTypesIndex, []byte, error)

WoWPowerTypesIndex returns an index of power types.

func (*Client) WoWPvPLeaderboard

func (c *Client) WoWPvPLeaderboard(pvpSeasonID int, pvpBracket wowgd.Bracket) (*wowgd.PvPLeaderboard, []byte, error)

WoWPvPLeaderboard returns the PvP leaderboard of a specific PvP bracket for a PvP season.

func (*Client) WoWPvPLeaderboardsIndex

func (c *Client) WoWPvPLeaderboardsIndex(pvpSeasonID int) (*wowgd.PvPLeaderboardsIndex, []byte, error)

WoWPvPLeaderboardsIndex returns an index of PvP leaderboards for a PvP season.

func (*Client) WoWPvPRewardsIndex

func (c *Client) WoWPvPRewardsIndex(pvpSeasonID int) (*wowgd.PvPRewardsIndex, []byte, error)

WoWPvPRewardsIndex returns an index of PvP rewards for a PvP season.

func (*Client) WoWPvPSeason

func (c *Client) WoWPvPSeason(pvpSeasonID int) (*wowgd.PvPSeason, []byte, error)

WoWPvPSeason returns a PvP season by ID.

func (*Client) WoWPvPSeasonIndex

func (c *Client) WoWPvPSeasonIndex() (*wowgd.PvPSeasonIndex, []byte, error)

WoWPvPSeasonIndex returns an index of PvP seasons.

func (*Client) WoWPvPTier

func (c *Client) WoWPvPTier(pvpTierID int) (*wowgd.PvPTier, []byte, error)

WoWPvPTier returns a PvP tier by ID.

func (*Client) WoWPvPTierMedia

func (c *Client) WoWPvPTierMedia(pvpTierID int) (*wowgd.PvPTierMedia, []byte, error)

WoWPvPTierMedia returns media for a PvP tier by ID.

func (*Client) WoWPvPTiersIndex

func (c *Client) WoWPvPTiersIndex() (*wowgd.PvPTiersIndex, []byte, error)

WoWPvPTiersIndex returns an index of PvP tiers.

func (*Client) WoWQuest

func (c *Client) WoWQuest(questID int) (*wowc.Quest, []byte, error)

WoWQuest returns metadata for a specified quest

func (*Client) WoWRealm

func (c *Client) WoWRealm(realmSlug string) (*wowgd.Realm, []byte, error)

WoWRealm returns a single realm by slug or ID.

func (*Client) WoWRealmIndex

func (c *Client) WoWRealmIndex() (*wowgd.RealmIndex, []byte, error)

WoWRealmIndex returns an index of realms.

func (*Client) WoWRealmStatus

func (c *Client) WoWRealmStatus() (*wowc.RealmStatus, []byte, error)

WoWRealmStatus returns metadata for a specified quest

func (*Client) WoWRecipe

func (c *Client) WoWRecipe(recipeID int) (*wowc.Recipe, []byte, error)

WoWRecipe returns basic recipe information

func (*Client) WoWRegion

func (c *Client) WoWRegion(regionID int) (*wowgd.Region, []byte, error)

WoWRegion returns a single region by ID.

func (*Client) WoWRegionBattlegroups

func (c *Client) WoWRegionBattlegroups() (*wowc.RegionBattlegroups, []byte, error)

WoWRegionBattlegroups returns a list of battlegroups for the specified region. Note the trailing / on this request path

func (*Client) WoWRegionIndex

func (c *Client) WoWRegionIndex() (*wowgd.RegionIndex, []byte, error)

WoWRegionIndex returns an index of regions.

func (*Client) WoWReputationFaction

func (c *Client) WoWReputationFaction(reputationFactionID int) (*wowgd.ReputationFaction, []byte, error)

WoWReputationFaction returns a single reputation faction by ID.

func (*Client) WoWReputationFactionsIndex

func (c *Client) WoWReputationFactionsIndex() (*wowgd.ReputationFactionsIndex, []byte, error)

WoWReputationFactionsIndex returns an index of reputation factions.

func (*Client) WoWReputationTiers

func (c *Client) WoWReputationTiers(reputationTiersID int) (*wowgd.ReputationTiers, []byte, error)

WoWReputationTiers returns a single set of reputation tiers by ID.

func (*Client) WoWReputationTiersIndex

func (c *Client) WoWReputationTiersIndex() (*wowgd.ReputationTiersIndex, []byte, error)

WoWReputationTiersIndex returns an index of reputation tiers.

func (*Client) WoWSpell

func (c *Client) WoWSpell(spellID int) (*wowc.Spell, []byte, error)

WoWSpell returns information about spells

func (*Client) WoWTalents

func (c *Client) WoWTalents() (*wowc.Talents, []byte, error)

WoWTalents returns a list of talents, specs, and glyphs for each class

func (*Client) WoWTitle

func (c *Client) WoWTitle(titleID int) (*wowgd.Title, []byte, error)

WoWTitle returns a title by ID.

func (*Client) WoWTitlesIndex

func (c *Client) WoWTitlesIndex() (*wowgd.TitlesIndex, []byte, error)

WoWTitlesIndex returns an index of titles.

func (*Client) WoWToken

func (c *Client) WoWToken() (*wowgd.Token, []byte, error)

WoWToken returns the WoW Token index

func (*Client) WoWUserCharacters

func (c *Client) WoWUserCharacters(token *oauth2.Token) (*wowc.Profile, []byte, error)

WoWUserCharacters returns all characters for user's Access Token

func (*Client) WoWZone

func (c *Client) WoWZone(zoneID int) (*wowc.Zone, []byte, error)

WoWZone returns information about zone

func (*Client) WoWZoneMasterList

func (c *Client) WoWZoneMasterList() (*wowc.ZoneMasterList, []byte, error)

WoWZoneMasterList returns a list of all supported zones and their bosses. A "zone" in this context should be considered a dungeon or a raid, not a world zone. A "boss" in this context should be considered a boss encounter, which may include more than one NPC

type Locale

type Locale string

Locale generic locale string enUS, esMX, ptBR, enGB, esES, frFR, ruRU, deDE, ptPT, itIT, koKR, zhTW, zhCN

func (Locale) String

func (locale Locale) String() string

type OAuth

type OAuth struct {
	ClientID     string
	ClientSecret string
	Token        *oauth2.Token
}

OAuth credentials and access token to access Blizzard API

type Region

type Region int

Region type

const (
	US Region
	EU
	KR
	TW
	CN
)

Region constants (1=US, 2=EU, 3=KO and TW, 5=CN) DO NOT REARRANGE

func (Region) String

func (region Region) String() string

Directories

Path Synopsis
Package d3c contains types for the Diablo 3 Community APIs
Package d3c contains types for the Diablo 3 Community APIs
Package d3gd contains types for the Diablo 3 Game Data APIs
Package d3gd contains types for the Diablo 3 Game Data APIs
Package hsgd contains types for the Hearthstone Game Data APIs
Package hsgd contains types for the Hearthstone Game Data APIs
Package oauth contains types for the OAuth APIs
Package oauth contains types for the OAuth APIs
Package sc2c contains types for the Starcraft 2 Community APIs
Package sc2c contains types for the Starcraft 2 Community APIs
Package sc2gd contains types for the Starcraft 2 Game Data APIs
Package sc2gd contains types for the Starcraft 2 Game Data APIs
Package wowc contains types for the World of Warcraft Community APIs
Package wowc contains types for the World of Warcraft Community APIs
Package wowcgd contains types for the World of Warcraft Classic Game Data APIs
Package wowcgd contains types for the World of Warcraft Classic Game Data APIs
Package wowgd contains types for the World of Warcraft Game Data APIs
Package wowgd contains types for the World of Warcraft Game Data APIs
Package wowp contains types for the World of Warcraft Profile APIs
Package wowp contains types for the World of Warcraft Profile APIs

Jump to

Keyboard shortcuts

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