Class: Tasks

repositories.Tasks

Tasks repository.

The Tasks class allows the user to manage tasks and their properties.

Hierarchy

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new Tasks(agent)

Creates an instance of Repository.

Parameters

Name Type
agent PeerAgent

Inherited from

Repository .constructor

Methods

get

get(taskId?): Promise<SDKTask>

Retrieves a task.

If the task id is not provided, the active task is returned.

Example

Copy
Copied
const activeTask = await dl.tasks.get()

Example

Copy
Copied
const task = await dl.tasks.get('taskId-123')

Parameters

Name Type Description
taskId? string The id of the task to be retrieved.

Returns

Promise<SDKTask>

  • A promise that resolves to the retrieved task.