Package wink
is a Go client library for interacting with
the Wink API.
Wink requires Go 1.5 or later.
go get github.com/joelanford/wink
package main
import (
"fmt"
"log"
"github.com/joelanford/wink"
)
func main() {
c := wink.NewClient("<my_wink_client_id>", "<my_wink_client_secret>")
err := c.Authenticate("<my_wink_email_address>", "<my_wink_password>")
if err != nil {
log.Fatalln(err)
}
devicesJSON, err := c.GetDevicesJSON()
if err != nil {
log.Fatalln(err)
} else {
fmt.Println(devicesJSON)
}
devices, err := c.GetDevices()
if err != nil {
log.Fatalln(err)
} else {
for _, device := range devices {
fmt.Printf("%+v\n", device)
}
}
}
See for automatically generated API documentation.
This package's documentation is a work-in-progress. Pull requests are appreciated!
This is an unofficial client for the Wink API. Please do not contact Wink unless you're sure the problem is not in this library. Please submit issues and/or pull requests if you find issues with the package.
Contributions in the form of Pull Requests are gladly accepted.
If you have a Wink device that's not yet supported, please create a new issue containing the full JSON device output or a pull request that adds support for your device.
This is Free Software, released under the terms of the GPL v3.