diff options
author | Collin Guarino <collin.guarino@gmail.com> | 2016-02-13 11:25:45 -0500 |
---|---|---|
committer | Collin Guarino <collin.guarino@gmail.com> | 2016-02-13 11:25:45 -0500 |
commit | 922e7290c37e46046b1a4e68818c77c44a192b2e (patch) | |
tree | c3c0f24523c05f4edcec1a77fe12ac57a6c90ddc /bridge.go | |
parent | 0a6419db7d1db3f7521c6532b126d78526c65caa (diff) |
Added documentation for Bridge.Delete, Bridge.Put, Light.Delete.
Diffstat (limited to 'bridge.go')
-rw-r--r-- | bridge.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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{} |