goxero

package module
v0.0.0-...-21f22a8 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: MIT Imports: 2 Imported by: 0

README

goxero

Golang api for working with the Xero api

Documentation

Index

Constants

View Source
const (
	XeroRequestTokenURL       = "https://api.xero.com/oauth/RequestToken"
	XeroAuthorizeTokenURL     = "https://api.xero.com/oauth/Authorize"
	XeroAccessTokenURL        = "https://api.xero.com/oauth/AccessToken"
	XeroApiEndpointURL        = "https://api.xero.com/api.xro/2.0/"
	XeroApiPayrollEndpointURL = "https://api.xero.com/payroll.xro/1.0/"
)

Variables

This section is empty.

Functions

func CreateAccessToken

func CreateAccessToken(token, secret string, data map[string]string) oauth.AccessToken

Types

type XeroConsumer

type XeroConsumer struct {
	Consumer    *oauth.Consumer
	AccessToken *oauth.AccessToken
}

func NewConsumer

func NewConsumer(consumerKey, consumerSecret string) *XeroConsumer

func (*XeroConsumer) Get

func (x *XeroConsumer) Get(path string, userParams map[string]string) (resp *http.Response, err error)

func (*XeroConsumer) RefreshToken

func (x *XeroConsumer) RefreshToken(accessToken *oauth.AccessToken) (atoken *oauth.AccessToken, err error)

func (*XeroConsumer) SetAccessToken

func (x *XeroConsumer) SetAccessToken(token, secret string, data map[string]string)

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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