aboutsummaryrefslogtreecommitdiff
path: root/lights.go
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-01-24 23:36:07 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-01-24 23:36:07 -0500
commit3d0ad2f5e81c734bc0ca6364d2ea7c966ef5dbb9 (patch)
treef7cab7f6cf2a89e18cf5f6c251847c0fe0330737 /lights.go
parentc05519e646091a1791aa278f468962407e691bc3 (diff)
Improved function header documentation format.
Diffstat (limited to 'lights.go')
-rw-r--r--lights.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/lights.go b/lights.go
index eea2daf..55822fd 100644
--- a/lights.go
+++ b/lights.go
@@ -32,6 +32,8 @@ type Light struct {
//http://192.168.1.128/api/319b36233bd2328f3e40731b23479207/lights/
// http://<bridge_ip>/api/<username>/lights/
+
+// GetAllLights retreives the state of all lights that the bridge is aware of.
func GetAllLights(bridge *Bridge) {
response, error := http.Get(
fmt.Sprintf("http://%s/api/%s/lights/", bridge.IPAddress, bridge.Username))
@@ -50,7 +52,7 @@ func GetAllLights(bridge *Bridge) {
os.Exit(1)
}
- data := []Light{}
+ data := Light{}
error = json.Unmarshal(body, &data)
if error != nil {
trace("", error)