bnet

package
v0.0.0-...-f67852a Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArenaRating

type ArenaRating struct {
	Brackets Brackets
}

type ArenaStats

type ArenaStats struct {
	Rating       int
	SeasonPlayed int
	SeasonWon    int
	SeasonLost   int
}

type Brackets

type Brackets struct {
	TwoPlayers   ArenaStats `json:"ARENA_BRACKET_2v2"`
	ThreePlayers ArenaStats `json:"ARENA_BRACKET_3v3"`
	RBG          ArenaStats `json:"ARENA_BRACKET_RBG"`
}

type CharacterProfile

type CharacterProfile struct {
	Name        string
	Realm       string
	Region      string
	Class       int
	Level       int
	Thumbnail   string
	Guild       Guild
	Items       Items
	Talents     []SpecTalents
	ArenaRating ArenaRating `json:"pvp"`
}

type Client

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

func New

func New(secret string) *Client

New creates a new Battle.Net client

func (*Client) GetCharacterProfile

func (c *Client) GetCharacterProfile(region, realm, name string) (*CharacterProfile, error)

GetCharacterProfile retrieves character profile from Battle.Net API by character name and realm If not found, then error is thrown

type Enchantments

type Enchantments struct {
	Gem0        int
	Gem1        int
	Gem2        int
	Gem3        int
	Gem4        int
	Enchantment int
}

type Guild

type Guild struct {
	Name string `json:"name"`
}

type Item

type Item struct {
	ID           int
	Name         string
	ItemLevel    int
	Icon         string
	Enchantments Enchantments `json:"tooltipParams"`
}

type Items

type Items struct {
	AverageItemLevelEquipped int `json:"averageItemLevelEquipped,omitempty"`
	Head                     Item
	Neck                     Item
	Shoulder                 Item
	Back                     Item
	Chest                    Item
	Tabard                   Item
	Wrist                    Item
	Hands                    Item
	Waist                    Item
	Legs                     Item
	Feet                     Item
	Finger1                  Item
	Finger2                  Item
	Trinket1                 Item
	Trinket2                 Item
	MainHand                 Item
	OffHand                  Item
}

type Spec

type Spec struct {
	Name  string
	Icon  string
	Order int
}

type SpecTalents

type SpecTalents struct {
	Selected bool
	Talents  []Talents
}

type Spell

type Spell struct {
	ID          int
	Name        string
	Icon        string
	Description string
}

type Talents

type Talents struct {
	Tier  int
	Spell Spell
	Spec  Spec
}

Jump to

Keyboard shortcuts

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