Get an objective task by ID
client.objectives.tasks.retrieve(stringid, TaskRetrieveParams { objectiveId } params, RequestOptionsoptions?): ObjectiveTask { data, metadata }
GET/v1/objectives/{objectiveId}/tasks/{id}
Get an objective task by ID
import Cadenya from '@cadenya/cadenya';
const client = new Cadenya({
apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted
});
const objectiveTask = await client.objectives.tasks.retrieve('id', { objectiveId: 'objectiveId' });
console.log(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"
}
}