Documentation
¶
Overview ¶
Package battlenet provides clients for accessing Blizzard Entertainment's various Battle.net API endpoints, including ones for Diablo III, Starcraft II, Overwatch, and World of Warcraft.
Official Battle.net API documentation can be found at: https://dev.battle.net/io-docs
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Endpoint = func(r regions.Region) oauth2.Endpoint { return oauth2.Endpoint{ AuthURL: r.AuthURL(), TokenURL: r.TokenURL(), } }
Endpoint is Battle.net's OAuth 2.0 endpoint. Defaults to US if Region is not otherwise defined.
For more information see: https://dev.battle.net/docs/read/oauth
var Locale = struct { AmericanEnglish locale.Locale BrazilianPortuguese locale.Locale BritishEnglish locale.Locale CastilianSpanish locale.Locale EuropeanPortuguese locale.Locale MexicanSpanish locale.Locale SimplifiedChinese locale.Locale StandardFrench locale.Locale StandardGerman locale.Locale StandardItalian locale.Locale StandardKorean locale.Locale StandardRussian locale.Locale TraditionalChinese locale.Locale }{ locale.AmericanEnglish, locale.BrazilianPortuguese, locale.BritishEnglish, locale.CastilianSpanish, locale.EuropeanPortuguese, locale.MexicanSpanish, locale.SimplifiedChinese, locale.StandardFrench, locale.StandardGerman, locale.StandardItalian, locale.StandardKorean, locale.StandardRussian, locale.TraditionalChinese, }
Locale holds all of the possible Battle.net locale definitions.
var Regions = struct { US regions.Region EU regions.Region KR regions.Region TW regions.Region SEA regions.Region CN regions.Region }{ US: regions.US, EU: regions.EU, KR: regions.KR, TW: regions.TW, SEA: regions.SEA, CN: regions.CN, }
Regions holds all of the possible Battle.net regions.
Functions ¶
func AccountClient ¶
AccountClient returns a new client for accessing the Battle.net Account API.
Types ¶
type Client ¶
type Client interface { // Region returns the client's current region as a string. Region() string // Locale returns the client's current locale as a string. Locale() string // UserAgent returns the client User-Agent header used in API requests. UserAgent() string }
Client defines the Battle.net API client interface.
type Quota ¶
type Quota interface { // QPSAllotted returns the allotted QPS. QPSAllotted() int // QPSCurrent returns the current QPS. QPSCurrent() int // QuotaAlloted returns the alloted quota. QuotaAlloted() int // QuotaCurrent returns the current quota. QuotaCurrent() int // QuotaReset returns the time the quota will reset. QuotaReset() time.Time }
Quota defines the battlenet.Quota interface.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package errors defines errors that are potentially returned from gobattlenet clients.
|
Package errors defines errors that are potentially returned from gobattlenet clients. |
Package examples provides various examples for using the gobattlenet library.
|
Package examples provides various examples for using the gobattlenet library. |
Package http contains all of the clients for accessing and obtaining data from the Battle.net API.
|
Package http contains all of the clients for accessing and obtaining data from the Battle.net API. |
account
Package account contains the account client defintions for accessing and obtaining data from the Battle.net API.
|
Package account contains the account client defintions for accessing and obtaining data from the Battle.net API. |
account/response
Package response contains all of the account response defintions returned by the Battle.net API.
|
Package response contains all of the account response defintions returned by the Battle.net API. |
d3
Package d3 contains the Diablo III client defintions for accessing and obtaining data from the Battle.net API.
|
Package d3 contains the Diablo III client defintions for accessing and obtaining data from the Battle.net API. |
d3/response
Package response contains all of the Diablo III response defintions returned by the Battle.net API.
|
Package response contains all of the Diablo III response defintions returned by the Battle.net API. |
sc2
Package sc2 contains the Starcraft II client defintions for accessing and obtaining data from the Battle.net API.
|
Package sc2 contains the Starcraft II client defintions for accessing and obtaining data from the Battle.net API. |
sc2/response
Package response contains all of the Starcraft II response defintions returned by the Battle.net API.
|
Package response contains all of the Starcraft II response defintions returned by the Battle.net API. |
wow
Package wow contains the World of Warcraft client defintions for accessing and obtaining data from the Battle.net API.
|
Package wow contains the World of Warcraft client defintions for accessing and obtaining data from the Battle.net API. |
wow/response
Package response contains all of the World of Warcraft response defintions returned by the Battle.net API.
|
Package response contains all of the World of Warcraft response defintions returned by the Battle.net API. |
Package locale defines valid language and country sets for accessing the Battle.net API.
|
Package locale defines valid language and country sets for accessing the Battle.net API. |
Package models defines all data models returned by the Battle.net API.
|
Package models defines all data models returned by the Battle.net API. |
account
Package account defines profile data models returned by the Battle.net API.
|
Package account defines profile data models returned by the Battle.net API. |
d3
Package d3 defines Diablo III data models returned by the Battle.net API.
|
Package d3 defines Diablo III data models returned by the Battle.net API. |
sc2
Package sc2 defines Starcraft II data models returned by the Battle.net API.
|
Package sc2 defines Starcraft II data models returned by the Battle.net API. |
wow
Package wow defines World of Warcraft data models returned by the Battle.net API.
|
Package wow defines World of Warcraft data models returned by the Battle.net API. |
Package quota contains usage data about the Battle.net API, which comes back as part of the response headers after you make a call with one of the gobattlenet clients.
|
Package quota contains usage data about the Battle.net API, which comes back as part of the response headers after you make a call with one of the gobattlenet clients. |
Package regions defines all possible Blizzard regions for communicating with the Battle.net API.
|
Package regions defines all possible Blizzard regions for communicating with the Battle.net API. |