awair

package
v0.0.0-...-b41f800 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEVICES_KEY              = "devices"
	DEVICE_LATEST_KEY_FORMAT = "device-latest-%s-%d"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(accessToken string, cacheTTL time.Duration, options ...awair_api.Option) *Client

func (*Client) GetDeviceAPIUsage

func (c *Client) GetDeviceAPIUsage(deviceType string, deviceId int) (*awair_api.DeviceUsage, error)

func (*Client) GetDeviceList

func (c *Client) GetDeviceList() (*awair_api.DeviceList, error)

func (*Client) GetLatestData

func (c *Client) GetLatestData(deviceType string, deviceId int) (*awair_api.DeviceDataList, error)

func (*Client) GetUserInfo

func (c *Client) GetUserInfo() (*awair_api.User, error)

func (*Client) SetCacheTTL

func (c *Client) SetCacheTTL(ttl time.Duration)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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