func (c *Client) GetStaticNamespace() string {
	return c.staticNamespace
}
GetStaticNamespace returns the static namespace of the client
package blizzard
import (
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"strconv"
	"strings"
	"github.com/FuzzyStatic/blizzard/wowp"
	"github.com/FuzzyStatic/blizzard/wowsearch"
	"github.com/go-playground/validator"
	"golang.org/x/oauth2"
	"golang.org/x/oauth2/clientcredentials"
)
type Config struct {
	ClientID string `validate:"required"`
	ClientSecret string `validate:"required"`
	HTTPClient *http.Client `validate:"required"`
	Region Region `validate:"required"`
	Locale Locale `validate:"required"`
}
type Client struct {
	cfg                                             Config
	httpClient                                      *http.Client
	clntCredCfg                                     clientcredentials.Config
	authorizedCfg                                   oauth2.Config
	oauth                                           OAuth
	oauthHost                                       string
	apiHost                                         string
	dynamicNamespace, staticNamespace               string
	profileNamespace                                string
	dynamicClassicNamespace, staticClassicNamespace string
	region                                          Region
	locale                                          Locale
}
type Region int
const (
	_ Region = iota
	US
	EU
	KR
	TW
	CN
)
func (region Region) String() string {
	var rr = []string{
		"",
		"us",
		"eu",
		"kr",
		"tw",
		"cn",
	}
	return rr[region]
}
type Locale string
func (locale Locale) String() string {
	return string(locale)
}
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")
	PtPT = Locale("pt_PT")
	DeDE = Locale("de_DE")
	ItIT = Locale("it_IT")
	KoKR = Locale("ko_KR")
	ZhTW = Locale("zh_TW")
	ZhCN = Locale("zh_CN")
)
func NewClient(cfg Config) (*Client, error) {
	var (
		c   Client
		v   *validator.Validate
		err error
	)
	v = validator.New()
	err = v.Struct(cfg)
	if err != nil {
		return nil, err
	}
	c.cfg = cfg
	c.clntCredCfg = clientcredentials.Config{
		ClientID:     cfg.ClientID,
		ClientSecret: cfg.ClientSecret,
	}
	c.oauth = OAuth{
		ClientID:     cfg.ClientID,
		ClientSecret: cfg.ClientSecret,
	}
	err = c.SetRegionParameters(cfg.Region, cfg.Locale)
	if err != nil {
		return nil, err
	}
	return &c, nil
}
func (c *Client) GetLocale() Locale {
	return c.locale
}
func (c *Client) GetRegion() Region {
	return c.region
}
func (c *Client) SetRegionParameters(region Region, locale Locale) error {
	err := validateRegionLocalePair(region, locale)
	if err != nil {
		return err
	}
	c.region = region
	c.locale = locale
	switch region {
	case CN:
		c.oauthHost = "https://www.battlenet.com.cn"
		c.apiHost = "https://gateway.battlenet.com.cn"
		c.dynamicNamespace = "dynamic-zh"
		c.dynamicClassicNamespace = "dynamic-classic-zh"
		c.profileNamespace = "profile-zh"
		c.staticNamespace = "static-zh"
		c.staticClassicNamespace = "static-classic-zh"
	default:
		c.oauthHost = fmt.Sprintf("https://%s.battle.net", region)
		c.apiHost = fmt.Sprintf("https://%s.api.blizzard.com", region)
		c.dynamicNamespace = fmt.Sprintf("dynamic-%s", region)
		c.dynamicClassicNamespace = fmt.Sprintf("dynamic-classic-%s", region)
		c.profileNamespace = fmt.Sprintf("profile-%s", region)
		c.staticNamespace = fmt.Sprintf("static-%s", region)
		c.staticClassicNamespace = fmt.Sprintf("static-classic-%s", region)
	}
	c.clntCredCfg.TokenURL = c.oauthHost + "/oauth/token"
	c.httpClient = c.clntCredCfg.Client(
		context.WithValue(context.TODO(), oauth2.HTTPClient, c.cfg.HTTPClient),
	)
	return nil
}
func (c *Client) GetOAuthHost() string {
	return c.oauthHost
}
func (c *Client) GetAPIHost() string {
	return c.apiHost
}
func (c *Client) GetDynamicNamespace() string {
	return c.dynamicNamespace
}
func (c *Client) GetDynamicClassicNamespace() string {
	return c.dynamicClassicNamespace
}
func (c *Client) GetProfileNamespace() string {
	return c.profileNamespace
}