This commit is contained in:
Wlad Meixner 2019-02-09 18:08:35 +01:00
commit 46868b28df

View File

@ -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. // 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 "", "", false return CreateUserExtended(addr, "go-hue-interface", "Philips hue")
} }
// TODO: remove these comments // TODO: remove these comments
// example application: "go.hue.interface"
// example deviceName: "Philips hue"
func CreateUserExtended(addr, application, deviceName string) (u *User, err error) { func CreateUserExtended(addr, application, deviceName string) (u *User, err error) {
uri := "http://" + addr + "/api" uri := "http://" + addr + "/api"