regions

package
v0.0.0-...-3525954 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package regions defines all possible Blizzard regions for communicating with the Battle.net API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Region

type Region int

Region can be one of: US, EU, KR, TW, SEA, or CN

const (
	US Region = iota
	EU
	KR
	TW
	SEA
	CN
)

Valid regions.

func (Region) API

func (r Region) API() string

API returns the URL relative to the region for REST calls.

func (Region) AuthURL

func (r Region) AuthURL() string

AuthURL returns the URL for OAuth authorization.

func (Region) Int

func (r Region) Int() int

Int returns the region as an integer value.

func (Region) Itoa

func (r Region) Itoa() string

Itoa returns the region's integer value as a string representation.

func (Region) String

func (r Region) String() string

String returns the region as a lowercase string. If the region is invalid, the function causes a panic.

func (Region) TokenURL

func (r Region) TokenURL() string

TokenURL returns the URL to retrieve an OAuth token.

Jump to

Keyboard shortcuts

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