jsonapi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: Apache-2.0 Imports: 15 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 {
	// contains filtered or unexported fields
}

Client is used to access with the remote gateway

func NewClient

func NewClient(server, token, machineid string) *Client

NewClient returns a new Client instance which can be used to interact with the gateway.

func (*Client) Get

func (c *Client) Get(api string, res interface{}) error

Get is used to send the GET request

func (*Client) Post

func (c *Client) Post(api string, req, res interface{}) error

Post is used to send the POST request

func (*Client) Put

func (c *Client) Put(api string, req, res interface{}) error

Put is used to send the PUT request

func (*Client) SetToken

func (c *Client) SetToken(token string)

Jump to

Keyboard shortcuts

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