bnet

package module
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"
	RegionAPAC = "apac"
	RegionCN   = "cn"
)

Variables

This section is empty.

Functions

func CheckRegion

func CheckRegion(v string) bool

func CheckRegionBytes

func CheckRegionBytes(b []byte) bool

Types

type App

type App struct {
	ClientId     string
	ClientSecret string
	WoW          *wow.App
	// contains filtered or unexported fields
}

func NewApp

func NewApp(clientId, clientSecret string) *App

func (*App) BakeOAuthUrl

func (app *App) BakeOAuthUrl(w internal.XWriter, region string, scopes OAuthScope) internal.UrlEncodeXWriter

func (*App) BakeOAuthUrlBytes

func (app *App) BakeOAuthUrlBytes(w internal.XWriter, region []byte, scopes OAuthScope) internal.UrlEncodeXWriter

func (*App) GetOAuthToken

func (app *App) GetOAuthToken(region, code string, writeRedirectUri func(internal.UrlEncodeXWriter)) (string, error)

func (*App) GetOAuthTokenBytes

func (app *App) GetOAuthTokenBytes(region, code []byte, writeRedirectUri func(internal.UrlEncodeXWriter)) (string, error)

func (*App) WriteApiHost

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

type OAuthScope

type OAuthScope uint8
const (
	OAuthWow    OAuthScope = 1
	OAuthSc2    OAuthScope = 1 << 1
	OAuthD3     OAuthScope = 1 << 2
	OAuthOpenId OAuthScope = 1 << 3
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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