Get an objective task by ID
client.Objectives.Tasks.Get(ctx, objectiveID, id) (*ObjectiveTask, error)
GET/v1/objectives/{objectiveId}/tasks/{id}
Get an objective task by ID
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"),
)
objectiveTask, err := client.Objectives.Tasks.Get(
context.TODO(),
"objectiveId",
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", objectiveTask.Data)
}
{
"data": {
"completed": true,
"number": 0,
"task": "task",
"completedAt": "2019-12-27T18:11:19.117Z"
},
"metadata": {
"id": "id",
"name": "name"
}
}Returns Examples
{
"data": {
"completed": true,
"number": 0,
"task": "task",
"completedAt": "2019-12-27T18:11:19.117Z"
},
"metadata": {
"id": "id",
"name": "name"
}
}