Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Data ¶
type Data struct {
Devices []Device `json:"devices"`
}
Data struct is so annoying but necessary to use the json.Unmarshal func provided by Go Lang because of the API's use of data padding. I wish I could delete it, but I dont think I can :(
type Device ¶
type Device struct {
MAC string `json:"device"`
Model string `json:"model"`
Name string `json:"deviceName"`
Controllable bool `json:"controllable"`
Retrievable bool `json:"retrievable"`
Commands []string `json:"supportCmds"`
}
Device struct is a map of the API's device node. The struct contains information about the user's device.
type Devices ¶
type Devices struct {
Data Data `json:"data"`
Message string `json:"message"`
Status int `json:"status"`
}
Devices struct maps to the Govee Api JSON Endpoints as of v1. Devices is a list of all the Device's that belong to an authenticated user.
func (*Devices) ComplexList ¶
func (d *Devices) ComplexList()
ComplexList outputs the User's devices in a nice but complex way. It pretty much dumps everything the app knows about their device to the console.
func (*Devices) Get ¶
func (d *Devices) Get(c general.Connection)
Get Fills an empty Devices object with information provided from Govee's API using the Connection that must be passed as a parameter.
func (*Devices) SimpleList ¶
func (d *Devices) SimpleList()
SimpleList prints a simple list of Device's to the terminal, the list includes the name, model and if the device is controllable or not by this app.