dropbox

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OAuthEndpoint

func OAuthEndpoint(domain string) oauth2.Endpoint

OAuthEndpoint constructs an `oauth2.Endpoint` for the given domain

func Version

func Version() (string, string)

Version returns the current SDK version and API Spec version

Types

type APIError

type APIError struct {
	ErrorSummary string `json:"error_summary"`
}

APIError is the base type for endpoint-specific errors.

func (APIError) Error

func (e APIError) Error() string

type Config

type Config struct {
	// OAuth2 access token
	Token string
	// Enable verbose logging in SDK
	Verbose bool
	// Used with APIs that support operations as another user
	AsMemberID string
	// No need to set -- for testing only
	Domain string
}

Config contains parameters for configuring the SDK.

type Context

type Context struct {
	Client *http.Client
	Config Config
	// contains filtered or unexported fields
}

Context is the base client context used to implement per-namespace clients.

func NewContext

func NewContext(c Config) Context

NewContext returns a new Context with the given Config.

func (*Context) GenerateURL

func (c *Context) GenerateURL(host string, namespace string, route string) string

GenerateURL returns the appropriate URL for given namespace/route.

type Tagged

type Tagged struct {
	Tag string `json:".tag"`
}

Tagged is used for tagged unions.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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