Skip to content

Commit

Permalink
Added function getListRotation function
Browse files Browse the repository at this point in the history
  • Loading branch information
y0rune committed Oct 29, 2022
1 parent 8963ed2 commit faace86
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,19 @@ func deleteSchedule(scheduleClient schedule.Client, scheduleID string) {
}
}

func getListRotation(scheduleClient schedule.Client, scheduleID string) *schedule.ListRotationsResult {
scheduleResult, err := scheduleClient.ListRotations(nil, &schedule.ListRotationsRequest{
ScheduleIdentifierType: schedule.Id,
ScheduleIdentifierValue: scheduleID,
})

if err != nil {
fmt.Printf("Schedule %s can not be get.\n", scheduleID)
os.Exit(1)
}
return scheduleResult
}

func main() {
apiKey := flag.String("apiKey", "", "# ApiKey for use in that script")
scheduleName := flag.String("scheduleName", "Test Schedule", "# Name of schedule")
Expand Down

0 comments on commit faace86

Please sign in to comment.