ptc

package
v0.0.0-...-ec6bfc9 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginError

type LoginError struct {
	// contains filtered or unexported fields
}

LoginError is thrown when something went wrong with the login request

func (*LoginError) Error

func (e *LoginError) Error() string

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider contains data about and manages the session with the Pokémon Trainer's Club

func NewProvider

func NewProvider(username, password string) *Provider

NewProvider constructs a Pokémon Trainer's Club auth provider instance

func (*Provider) GetAccessToken

func (p *Provider) GetAccessToken() string

GetAccessToken will return an access token if it has been retrieved

func (*Provider) GetProviderString

func (p *Provider) GetProviderString() string

GetProviderString will return a string identifying the provider

func (*Provider) Login

func (p *Provider) Login(ctx context.Context) (string, error)

Login retrieves an access token from the Pokémon Trainer's Club

Jump to

Keyboard shortcuts

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