func main() {
	if config_filename != "" {
		k := key.New(config_filename)
		username_api_key = k.Username
		portal := portal.GetPortal()
		hue_hostname = portal[0].InternalIpAddress
		web_start()
	} else {
		usage()
	}
}
func main() {
	if config_filename != "" {
		k := key.New(config_filename)
		portal := portal.GetPortal()
		ll := lights.NewLights(portal[0].InternalIpAddress, k.Username)
		lights := ll.GetAllLights()
		fmt.Println("All Lights: ")
		for _, l := range lights {
			light := ll.GetLight(l.Id)
			print_light(light)
		}
	} else {
		usage()
	}
}
Exemple #3
0
func init() {
	k := key.New(username_api_key_filename)
	username_api_key = k.Username
}