Nanoleaf API made in Go (GoLang)
$ go get github.com/adnanbrq/nanoleaf
package main
import (
"github.com/adnanbrq/nanoleaf"
"os"
)
func main() {
url := os.Getenv("nanoleaf_url")
nano := nanoleaf.NewNanoleaf(url)
if err := nano.Identity.Flash(); err != nil {
panic(err)
}
if err := nano.Effects.Set("Flames"); err != nil {
panic(err)
}
}
- github.com/go-resty To Communicate with the Nanoleaf API