wow

package
v0.0.0-...-d17a93a Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RegionUS = "us"
	RegionEU = "eu"
	RegionKR = "kr"
	RegionTW = "tw"
	RegionCN = "cn"
)
View Source
const (
	LocaleEnUs = "en_US"
	LocaleEsMx = "es_MX"
	LocalePt   = "pt_BR"
	LocaleDe   = "de_DE"
	LocaleEnGb = "en_GB"
	LocaleEsEs = "es_ES"
	LocaleFr   = "fr_FR"
	LocaleIt   = "it_IT"
	LocaleRu   = "ru_RU"
	LocaleKo   = "ko_KR"
	LocaleZhTw = "zh_TW"
	LocaleZhCn = "zh_CN"
)

Variables

This section is empty.

Functions

func CheckLocale

func CheckLocale(v string) bool

func CheckLocaleBytes

func CheckLocaleBytes(b []byte) bool

func CheckRegion

func CheckRegion(v string) bool

func CheckRegionBytes

func CheckRegionBytes(b []byte) bool

Types

type App

type App struct{}

func NewApp

func NewApp() *App

func (*App) GetProfile

func (app *App) GetProfile(p *Profile, region, locale, token string) error

func (*App) GetProfileBytes

func (app *App) GetProfileBytes(p *Profile, region, locale, token []byte) error

func (*App) WriteApiHost

func (app *App) WriteApiHost(w internal.XWriter, region string)

type Character

type Character struct {
	ID    int    `json:"id"`
	Name  string `json:"name"`
	Realm struct {
		ID   int    `json:"id"`
		Name string `json:"name,intern"`
		Slug string `json:"slug,intern"`
	} `json:"realm"`
	Class struct {
		ID   int    `json:"id"`
		Name string `json:"name,intern"`
	} `json:"playable_class"`
	Race struct {
		ID   int    `json:"id"`
		Name string `json:"name,intern"`
	} `json:"playable_race"`
	Gender struct {
		Type string `json:"type,intern"`
		Name string `json:"name,intern"`
	} `json:"gender"`
	Faction struct {
		Type string `json:"type,intern"`
		Name string `json:"name,intern"`
	} `json:"faction"`
	Level int `json:"level"`
}

func (Character) MarshalEasyJSON

func (v Character) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Character) MarshalJSON

func (v Character) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Character) Reset

func (ch *Character) Reset()

func (*Character) UnmarshalEasyJSON

func (v *Character) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Character) UnmarshalJSON

func (v *Character) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Profile

type Profile struct {
	WoWAccounts []struct {
		ID         int         `json:"id"`
		Characters []Character `json:"characters"`
	} `json:"wow_accounts"`
}

func (Profile) MarshalEasyJSON

func (v Profile) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Profile) MarshalJSON

func (v Profile) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Profile) Reset

func (p *Profile) Reset()

func (*Profile) UnmarshalEasyJSON

func (v *Profile) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Profile) UnmarshalJSON

func (v *Profile) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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