mirror of
https://github.com/gosticks/go-hue-interface.git
synced 2025-10-16 11:45:35 +00:00
small fix in user
This commit is contained in:
parent
11eb5f4e93
commit
71905b94d2
@ -1,11 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"gopkg.in/yaml.v2"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Config hue api config
|
||||
|
||||
6
user.go
6
user.go
@ -14,13 +14,11 @@ type User struct {
|
||||
}
|
||||
|
||||
// CreateNewUser will create a new user. This should be called only of there's none in the yaml config.
|
||||
func CreateUser(addr string) (name, key string, succ bool) {
|
||||
|
||||
func CreateUser(addr string) (u *User, err error) {
|
||||
return CreateUserExtended(addr, "go-hue-interface", "Philips hue")
|
||||
}
|
||||
|
||||
// TODO: remove these comments
|
||||
// example application: "go.hue.interface"
|
||||
// example deviceName: "Philips hue"
|
||||
func CreateUserExtended(addr, application, deviceName string) (u *User, err error) {
|
||||
uri := "http://" + addr + "/api"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user