Class

MeTaskViews

MeTaskViews(client, taskViewId)

Class corresponding to Aworks TaskViews Endpoints
Constructor

# new MeTaskViews(client, taskViewId)

Endpoint constructor
Parameters:
Name Type Description
client Client
taskViewId String The id of the task view.
See:
  • [TaskViews in Awork API Docs](https://openapi.awork.com/#/TaskViews)

View Source endpoints/MeTaskViews.js, line 11

Classes

MeTaskViews

Methods

# async create(taskViewCreateModel) → {Promise.<TaskView>}

Creates a new task view. The user will automatically subscribe to it in the process. If the provided filter string is invalid the request will fail with status 400.
Parameters:
Name Type Description
taskViewCreateModel TaskViewCreateModel

View Source endpoints/MeTaskViews.js, line 37

Promise.<TaskView>

# async delete() → {Promise.<void>}

Deletes a task view. This also removes all subscriptions of the task view. Shared task views can be deleted by the original author or users with admin permissions. Private task views can only be deleted by the original author.

View Source endpoints/MeTaskViews.js, line 62

Promise.<void>

# async subscribe(taskViewId) → {Promise.<void>}

Subscribes the user to a shared task view. Afterwards the user can retrieve the matching tasks from /me/taskViews/id/tasks.
Parameters:
Name Type Description
taskViewId String The id of the task view the user subscribes to.

View Source endpoints/MeTaskViews.js, line 71

Promise.<void>

# async tasks(optionsopt) → {Promise.<Array.<Task>>}

Applies the filter of a task view the current user subscribed to and returns all matching tasks.
Parameters:
Name Type Attributes Description
options ListOptions <optional>
Pagination and filtering options

View Source endpoints/MeTaskViews.js, line 91

Promise.<Array.<Task>>

# async unsubscribe(taskViewId) → {Promise.<void>}

Removes the subscription from a user to a task view. Unsunscribing only works for shared task views.
Parameters:
Name Type Description
taskViewId String The id of the task view the user unsubscribes to.

View Source endpoints/MeTaskViews.js, line 81

Promise.<void>

# async update(taskViewUpdateModel) → {Promise.<Array.<TaskView>>}

Updates an existing task view. If the provided filter string is invalid the request will fail with status 400. Only the original author can update non-shared task view. Shared tasks lists can only be updated by the original author or someone with project planning permissions.
Parameters:
Name Type Description
taskViewUpdateModel TaskViewUpdateModel The model to update the task view.

View Source endpoints/MeTaskViews.js, line 52

Promise.<Array.<TaskView>>