mirror of
https://github.com/gosticks/go-hue-interface.git
synced 2025-10-16 11:45:35 +00:00
merge
This commit is contained in:
commit
46868b28df
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.
|
// 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"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user