aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--schedule.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/schedule.go b/schedule.go
index 43c7056..c7c2690 100644
--- a/schedule.go
+++ b/schedule.go
@@ -12,6 +12,7 @@ import (
"encoding/json"
)
+// Schedule struct defines attributes of Alarms and Timers
type Schedule struct {
Name string `json:"name"`
Description string `json:"description"`
@@ -30,6 +31,7 @@ type Schedule struct {
ID string
}
+// Bridge.GetSchedules will get Alarms and Timers in a Schedule struct.
func (bridge *Bridge) GetSchedules() ([]Schedule, error) {
uri := fmt.Sprintf("/api/%s/schedules", bridge.Username)
body, _, err := bridge.Get(uri)