aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-01-28 00:31:13 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-01-28 00:31:13 -0500
commite9c80250d27d73c970f9fa0515f9a0f396688e4f (patch)
tree29f9053fa01439b679c54cd6d2bfb56b4e02f7ce
parented41392d4253a3af6069871c4ea894db5529c230 (diff)
Added error struct, working on CreateUser integration for handling.
-rw-r--r--bridge.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/bridge.go b/bridge.go
index ea257f9..1106682 100644
--- a/bridge.go
+++ b/bridge.go
@@ -76,6 +76,16 @@ func GetBridgeInfo(self *Bridge) {
self.Info = *data
}
+// Error Struct - REST Error Response Format
+// http://www.developers.meethue.com/documentation/error-messages
+type Error struct {
+ response struct {
+ Type string `xml:"type"`
+ Address string `xml:"address"`
+ Description string `xml:"description"`
+ } `xml:"error"`
+}
+
// CreateUser posts to ./api on the bridge to create a new whitelisted user.
// If the button on the bridge was not pressed then _____todo_____
func CreateUser(bridge *Bridge, deviceType string) (string, error) {