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])
path
<String> E.g.'folders/IEABQ4RUI4AQJFU3/tasks'
parameters
<Object> E.g.{ importance: 'High' }
For all options, see: https://developers.wrike.com/documentation
Always returns a Promise
, resolving to either:
- The result object's
data
property - 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'