asana-api
A nodejs client implementation for Asana API
Last updated 5 years ago by indexzero .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install asana-api 
SYNC missed versions from official npm registry.

asana-api

A Node.js client implementation for Asana API.

Usage

Create the client with an API key

  var asana = require('asana-api');

  var client = asana.createClient({
    apiKey: 'your-secret-api-key'
  });

  client.users.list(function (err, users) {
    //
    // List all users for this Asana account.
    //
    console.dir(users);
  });

Alternatively, create the client with an OAuth access token

  var asana = require('asana-api');

  var client = asana.createClient({
    token: 'your-oauth-token'
  });

  client.users.list(function (err, users) {
    //
    // List all users for this Asana account.
    //
    console.dir(users);
  });

Or go even further and supply enough information for OAuth to refresh the access token

  var asana = require('asana-api');

  var client = asana.createClient({
    oauth: {
      accessToken : "your-oauth-token",
      refreshToken : "your-oauth-refresh-token",
      clientId : "your-client-id",
      clientSecret : "your-client-secret",
      redirectUrl : "your-redirect-url-to-store-new-token"
    }
  });

  client.users.list(function (err, users) {
    //
    // List all users for this Asana account.
    //
    console.dir(users);
  });

API Coverage

Implemented

  GET  /users
  GET  /users
  GET  /users/me
  GET  /users/:user-id

  GET  /workspaces
  GET  /workspaces/:workspace-id/tasks
  GET  /workspaces/:workspace-id/projects
  GET  /organizations/:workspace-id/teams

  POST /tasks
  GET  /tasks
  PUT  /tasks/:task-id
  GET  /tasks/:task-id
  DELETE /tasks/:task-id
  GET  /tasks/:task-id/stories
  POST /tasks/:task-id/stories
  POST /tasks/:task-id/addProject

  GET  /projects
  GET  /projects/:project-id/tasks

  POST /tags
  GET  /tags
  GET  /tags/:tag-id
  PUT  /tags/:tag-id
  GET  /tags/:tag-id/tasks

Not Implemented

  GET  /tasks/:task-id/projects
  POST /tasks/:task-id/removeProject

  GET /projects/:project-id
  PUT /projects/:project-id

  GET /stories/:story-id

  PUT  /workspaces/:workspace-id
  POST /workspaces/:workspace-id/tasks
  GET  /workspaces/:workspace-id/users

Run Tests

  $ npm test

AUTHOR: Charlie Robbins

LICENSE: MIT

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

6 Versions

  • 1.0.0                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.1                                ...           8 years ago
  • 0.1.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (1)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |