From e9c80250d27d73c970f9fa0515f9a0f396688e4f Mon Sep 17 00:00:00 2001 From: Collin Guarino Date: Thu, 28 Jan 2016 00:31:13 -0500 Subject: Added error struct, working on CreateUser integration for handling. --- bridge.go | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) { -- cgit v1.2.3