List objective tasks
client.Objectives.Tasks.List(ctx, objectiveID, query) (*CursorPagination[ObjectiveTask], error)
GET/v1/objectives/{objectiveId}/tasks
List objective tasks
package main
import (
"context"
"fmt"
"github.com/cadenya/cadenya-go"
"github.com/cadenya/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Objectives.Tasks.List(
context.TODO(),
"objectiveId",
cadenya.ObjectiveTaskListParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"items": [
{
"data": {
"completed": true,
"number": 0,
"task": "task",
"completedAt": "2019-12-27T18:11:19.117Z"
},
"metadata": {
"id": "id",
"name": "name"
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}Returns Examples
{
"items": [
{
"data": {
"completed": true,
"number": 0,
"task": "task",
"completedAt": "2019-12-27T18:11:19.117Z"
},
"metadata": {
"id": "id",
"name": "name"
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}