aboutsummaryrefslogtreecommitdiff
path: root/bridge.go
diff options
context:
space:
mode:
authorCollin Guarino <collin.guarino@gmail.com>2016-02-13 11:25:45 -0500
committerCollin Guarino <collin.guarino@gmail.com>2016-02-13 11:25:45 -0500
commit922e7290c37e46046b1a4e68818c77c44a192b2e (patch)
treec3c0f24523c05f4edcec1a77fe12ac57a6c90ddc /bridge.go
parent0a6419db7d1db3f7521c6532b126d78526c65caa (diff)
Added documentation for Bridge.Delete, Bridge.Put, Light.Delete.
Diffstat (limited to 'bridge.go')
-rw-r--r--bridge.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/bridge.go b/bridge.go
index bf50f2d..62cd252 100644
--- a/bridge.go
+++ b/bridge.go
@@ -80,6 +80,8 @@ func (self *Bridge) Post(path string, params interface{}) ([]byte, io.Reader, er
return handleResponse(resp)
}
+// Bridge.Put will send an http PUT to the bridge with
+// a body formatted with parameters (in a generic interface)
func (self *Bridge) Put(path string, params interface{}) ([]byte, io.Reader, error) {
uri := fmt.Sprintf("http://" + self.IPAddress + path)
client := &http.Client{}
@@ -99,6 +101,7 @@ func (self *Bridge) Put(path string, params interface{}) ([]byte, io.Reader, err
return handleResponse(resp)
}
+// Bridge.Delete will send an http DELETE to the bridge
func (self *Bridge) Delete(path string) error {
uri := fmt.Sprintf("http://" + self.IPAddress + path)
client := &http.Client{}