This is a Go wrapper for the Sensibo API.
This implements the API calls that are listed in the documentation here in a simple to use Go package that can be imported to any project.
To add go-sensibo to your project simply run:
go get github.com/odinn1984/go-sensibo
To use go-sensibo
simply add require github.com/odinn1984/go-sensibo v0.1.0
to your go.mod
file or just add github.com/odinn1984/go-sensibo
to an already existing require
block.
Then you can run the following simple code to get you started:
package main
import "github.com/odinn1984/go-sensibo"
func main() {
client := sensibo.New("my-api-key")
devices, err := client.GetAllDevices([]string{"*"})
if err != nil {
// Do some error handling
}
// Do something with devices
}
The above example get all of the devices that are configured on your Sensibo account.
For more information on usage please use one of the following commands:
go doc go-sensibo
go doc go-sensibo.Sensibo
go doc go-sensibo.<Function Name>
go doc go-sensibo/models
go doc go-sensibo/models.<Name Of Type>