1.0.1 • Published 8 years ago

nxus-asana v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

Nxus Asana

Build Status

A Nxus module for interacting with the Asana API. Built on top of the Asana API module.

Installation

> npm install nxus-asana --save

Usage

The module exposes the API client through a series of Nxus responders. First, you'll need to enter your personal access token in the package.json config:

'config': {
  'asana-api': {
    'token': 'your token goes here'
  }
}

or using an env variable ASANA_PERSONAL_TOKEN.

Once the token is present, you can access any of the API endpoints using the corresponding provider:

app.get('asana-api').users().then((Users) => {Users.findbyId(...)})

For how to use the API, and which methods are provided by each endpoint, take a look at the Asana API docs or the Asana NPM Module.

API

Module

src/index.js:39-144

A Nxus module for interacting with the Asana API. Built on top of the Asana API module.

Configuration

The module exposes the API client through a series of Nxus responders. First, you'll need to enter your personal access token in the package.json config:

'config': {
  'asana-api': {
    'token': 'your token goes here'
  }
}

or using an env variable ASANA_PERSONAL_TOKEN.

Examples

app.get('asana-api').users().then(...)

attachments

src/index.js:136-138

Returns the attachments endpoint

Returns function A wrapper for the Asana API Attachments endpoint.

events

src/index.js:96-98

Returns the events endpoint

Returns function A wrapper for the Asana API Events endpoint.

me

src/index.js:88-90

Returns the current Asana user

Returns Object The current user's object.

projects

src/index.js:64-66

Returns the projects endpoint

Returns function A wrapper for the Asana API Projects endpoint.

stories

src/index.js:128-130

Returns the stories endpoint

Returns function A wrapper for the Asana API Stories endpoint.

tags

src/index.js:120-122

Returns the tags endpoint

Returns function A wrapper for the Asana API Tags endpoint.

tasks

src/index.js:72-74

Returns the tasks endpoint

Returns function A wrapper for the Asana API Tasks endpoint.

teams

src/index.js:104-106

Returns the teams endpoint

Returns function A wrapper for the Asana API Teams endpoint.

users

src/index.js:80-82

Returns the users endpoint

Returns function A wrapper for the Asana API Users endpoint.

workspaces

src/index.js:112-114

Returns the workspaces endpoint

Returns function A wrapper for the Asana API Workspaces endpoint.