api

package
v0.0.0-...-892722f Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 6 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
}

func NewClient

func NewClient(clientId string, clientSecret string) *Client

func (Client) GetDevices

func (c Client) GetDevices() ([]*Device, error)

func (Client) GetSensorData

func (c Client) GetSensorData(deviceId string) (*SensorData, error)

type Device

type Device struct {
	Id          string   `json:"id"`
	DeviceType  string   `json:"deviceType"`
	Sensors     []string `json:"sensors"`
	ProductName string   `json:"productName"`
}

type SensorData

type SensorData struct {
	Time              int     `json:"time"`
	Battery           int     `json:"battery"`
	Co2               float64 `json:"co2"`
	Humidity          float64 `json:"humidity"`
	Pm1               float64 `json:"pm1"`
	Pm25              float64 `json:"pm25"`
	Pressure          float64 `json:"pressure"`
	RadonShortTermAvg float64 `json:"radonShortTermAvg"`
	RelayDeviceType   string  `json:"relayDeviceType"`
	Rssi              int     `json:"rssi"`
	Temp              float64 `json:"temp"`
	Voc               float64 `json:"voc"`
}

Jump to

Keyboard shortcuts

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