List worker schedules
client.Workers.Schedules.List(ctx, workerID) (*WorkerScheduleListResponse, error)
GET/api/workers/{workerId}/schedules
List worker schedules
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/handinger-go"
"github.com/stainless-sdks/handinger-go/option"
)
func main() {
client := handinger.NewClient(
option.WithAPIKey("My API Key"),
)
schedules, err := client.Workers.Schedules.List(context.TODO(), "t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", schedules.Schedules)
}
{
"schedules": [
{
"id": "id",
"budget": "low",
"input": "input",
"nextRunAt": "2019-12-27T18:11:19.117Z",
"type": "scheduled"
}
],
"workerId": "workerId"
}Returns Examples
{
"schedules": [
{
"id": "id",
"budget": "low",
"input": "input",
"nextRunAt": "2019-12-27T18:11:19.117Z",
"type": "scheduled"
}
],
"workerId": "workerId"
}