wrike-node

Node.js Wrike.com API wrapper.

Usage no npm install needed!

<script type="module">
  import wrikeNode from 'https://cdn.skypack.dev/wrike-node';
</script>

README

Wrike API

Node.js Wrike.com API wrapper.

Install

npm install --save wrike-node

Usage

const Wrike = require('wrike-node');
const wrike = new Wrike('<access_token>');

wrike
  .get('tasks', { limit: 3 })
  .then(tasks => console.log(tasks));

Reference

new Wrike(accessToken[, apiRegion = 'us'[, apiVersion = 4]])

  • accessToken <String>
  • apiRegion <String> Either 'us' or 'eu' Used to determine the API base URL.
  • apiVersion <Integer>

wrike.get|post|put|delete(path[, parameters])

Always returns a Promise, resolving to either:

  1. The result object's data property
  2. A Node.js Readable stream (only when downloading attachments or attachment previews)

Attachments

When creating or updating Wrike attachments, use the following custom parameters:

  • parameters.file <String|Buffer|Blob|Readable stream> E.g. 'Hello world!'
  • parameters.name <String> E.g. 'attachment.txt'
  • parameters.contentType <String> E.g. 'text/plain'