Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a rate limited HTTP client for the Battle.net API. Note that Authenticate must be called before making any requests.
func NewClient ¶
func NewClient(client HttpClient, opts ...ClientOption) *Client
func (*Client) Authenticate ¶
Refreshes access token from Battle.net API using stored client credentials. This must be called before making any requests to the API. This token will need to be included with future requests as a bearer token.
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
func WithCredentials ¶
func WithCredentials(clientId, clientSecret string) ClientOption
func WithLimiter ¶
func WithLimiter(l bool) ClientOption
type OfflineHttpClient ¶
type OfflineHttpClient struct{}
type Request ¶
A WoW API request.
func RequestFromUrl ¶
Creates a WoW API request from the given URL. The URL is expected to be in the format returned by the WoW API. e.g. https://us.api.blizzard.com/data/wow/talents?namespace=static-10.1.7_51059-us
func (*Request) HttpRequest ¶
Creates an http.Request from the WoW API request with the given token. This includes the authorization header, unlike Url() and String().