aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--bridge.go5
2 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 84ebc1c..5714396 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,8 @@ func main() {
// It is recommended that you save the username from bridge.CreateUser
// so you don't have to press the link button every time and re-auth.
// When CreateUser is called it will print the generated user token.
- bridge, _ := hue.FindBridge()
+ bridgesOnNetwork, _ := hue.FindBridges()
+ bridge := bridgesOnNetwork[0]
username, _ := bridge.CreateUser("someusernamehere")
bridge.Login(username)
diff --git a/bridge.go b/bridge.go
index a69c736..2a6fb26 100644
--- a/bridge.go
+++ b/bridge.go
@@ -152,9 +152,8 @@ func HandleResponse(resp *http.Response) ([]byte, io.Reader, error) {
return body, reader, nil
}
-// FindBridge will visit www.meethue.com/api/nupnp to see if a bridge
-// is available on the local network. This feature currently only supports one
-// bridge on the network.
+// FindBridges will visit www.meethue.com/api/nupnp to see a list of
+// bridges on the local network.
func FindBridges() ([]Bridge, error) {
bridge := Bridge{IPAddress: "www.meethue.com"}
body, _, err := bridge.Get("/api/nupnp")