Versions in this module Expand all Collapse all v1 v1.0.1 Nov 12, 2021 Changes in this version type Client + func (client *Client) GetStatuses(ctx context.Context, ids ...string) (devices []DeviceIdAndStatus, err error) + type DeviceIdAndStatus struct + Id string + Statuses Statuses + type Devices []Device + func (devices Devices) Ids() (ids []string) v1.0.0 Nov 10, 2021 Changes in this version + type AccessToken struct + AccessToken string + ExpireTime int + RefreshToken string + Uid string + type Client struct + AccessToken *AccessToken + ClientId string + ClientSecret string + Host string + func NewClient(id, secret string) *Client + func (client *Client) Execute(ctx context.Context, deviceId string, commands ...interface{}) error + func (client *Client) GetDevices(ctx context.Context) (devices []Device, err error) + func (client *Client) GetToken(ctx context.Context) error + func (client *Client) Request(ctx context.Context, method, path string, body interface{}, ...) (err error) + type Device struct + Category string + CreatedAt Time + Id string + IpAddress string + Name string + Online bool + Statuses Statuses + UpdatedAt Time + type Statuses map[string]interface + func (s *Statuses) UnmarshalJSON(data []byte) error + type Time time.Time + func (t *Time) UnmarshalJSON(data []byte) error + func (t Time) MarshalJSON() ([]byte, error) + func (t Time) String() string