Skip to content

Attachments.API

Phips Peter edited this page Jul 11, 2014 · 5 revisions

Class: Attachments

Attachments

A wrapper for the Attachments resource

new Attachments(dispatcher)

Constructs a resource accessor for Attachments that will use the dispatcher for all requests to the API

Parameters:
Name Type Description
dispatcher Dispatcher

The API dispatcher

Source:

Members

dispatcher :Dispatcher

An instance of the dispatcher. This is usually passed from the client.

Type:
Source:

Methods

findById(attachmentId, params) → {Promise}

Dispatches a GET request to /attachments/:attachmentId of the API to get information about the attachment.

Parameters:
Name Type Argument Description
attachmentId Number

The attachment id

params Object <optional>

Extra params for the dispatcher

Source:
Returns:

The result of the API call

Type
Promise

findByTask(taskId, params) → {Promise}

Dispatches a GET request to /tasks/:taskId/attachments of the API to get all attachments associated with the task.

Parameters:
Name Type Argument Description
taskId Number

The task id

params Object <optional>

Extra params for the dispatcher

Source:
Returns:

The result of the API call

Type
Promise

Generated with wicked.
Clone this wiki locally