NodeJS (Javascript) SDK for the Caplinked API.
Core information security endpoints for managing your virtual data room capabilities around files/folders, users/groups and permissions, uploads/downloads, dynamic watermarking, DRM (digital rights management) and more.
Vist Caplinked for more information.
Please inform about any content inconsistencies, outdated materials, cosmetic issues, bugs in the code, and other defects you find in the docs and samples by submitting an issue on this repository.
This application is tested using Testen. While this is somewhat opaque and brittle, Testen indicates that this SDK is compatible with Node Versions >= 4.
Download Node.js here. Verify your installation with node -v or which node.
npm install --save caplinked-api-node
/* -- index.js -- */
// initialize SDK
var CaplinkedSDK = require('caplinked-api-node');
var caplinked = new CaplinkedSDK({
apiUserToken: 'USER_TOKEN', // required or exception thrown
apiKey: 'API_KEY',
apiSecretKey: 'API_SECRET_KEY',
apiHost: 'https://sandbox.caplinked.com'
});
// get information about a particular file
var workspaceId = 438;
var fileId = 4675;
var pageNumber = 2;
caplinked.files.getFileInfo(workspaceId, fileId, pageNumber)
.then(function(response) {
// console.log(response);
})
.catch(function(error) {
// console.log(error);
});Then run it
node index.js
Please refer to the approriate wiki page to see a list of the available actions one may make via this SDK. Each action has a corresponding code example. Additionally, some wiki pages may contain gotchas or important information not covered here.