api

package
v0.1.1-0...-0392138 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Api

type Api struct {
	Auth     config.Auth
	AuthFile string
	BaseHost string
	Endpoint oauth2.Endpoint
	Config   oauth2.Config
	Client   *http.Client
}

func Create

func Create(config config.Config) (Api, error)

func (*Api) DoCall

func (self *Api) DoCall(request *Request) error

func (*Api) DoLogin

func (self *Api) DoLogin()

func (*Api) LoadToken

func (self *Api) LoadToken() (oauth2.Token, error)

func (*Api) PrepareClient

func (self *Api) PrepareClient() error

func (*Api) UpdateAuth

func (self *Api) UpdateAuth(token *oauth2.Token) error

type Request

type Request struct {
	Method   string
	Path     string
	Params   url.Values
	Response http.Response
	Data     map[string]interface{}
}

Jump to

Keyboard shortcuts

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