Skip to content

Dispatcher.API

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

Class: Dispatcher

Dispatcher

new Dispatcher(authKey, authValue)

An HTTP wrapper for the Asana API

Parameters:
Name Type Description
authKey String

The key for request authentication

authValue String | Object

The value for request authentication

Source:

Methods

<static> url(path) → {String}

Creates an Asana Url

Parameters:
Name Type Description
path String

The path

Source:
Returns:

The url

Type
String

delete(path) → {Promise}

Dispatches a DELETE request

Parameters:
Name Type Description
path String

The path of the API

Source:
Returns:

The response for the request

Type
Promise

dispatch(params) → {Promise}

Dispatches a request to the Asana API

Parameters:
Name Type Description
params Object

The params for request

Source:
Returns:

The response for the request

Type
Promise

get(path, query) → {Promise}

Dispatches a GET request

Parameters:
Name Type Argument Description
path String

The path of the API

query Object <optional>

The query params

Source:
Returns:

The response for the request

Type
Promise

post(path, data) → {Promise}

Dispatches a POST request

Parameters:
Name Type Description
path String

The path of the API

data Object

The data to be sent

Source:
Returns:

The response for the request

Type
Promise

put(path, data) → {Promise}

Dispatches a PUT request

Parameters:
Name Type Description
path String

The path of the API

data Object

The data to be sent

Source:
Returns:

The response for the request

Type
Promise

Generated with wicked.
Clone this wiki locally