client

package
v0.0.0-...-cfc4606 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ClientID     string
	ClientSecret string
	UserAgent    string
	BaseURL      *url.URL

	Debug bool
	// contains filtered or unexported fields
}

Client is a core class

func NewClient

func NewClient(clientID string, clientSecret string, host string) *Client

NewClient creates a new ClIent instance

func (*Client) Get

func (c *Client) Get(path string, params ...string) ([]byte, error)

Get makes an authenticated GET API call.

type Param

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

type Response

type Response struct {
	Headers map[string]string
	Status  int
	Body    []byte
	Data    string
}

Response contains the JSON body

type Token

type Token struct {
	Token string
}

Token struct represent the JSON auth response

Jump to

Keyboard shortcuts

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