npm install nodejs-box
First, you need to go through the OAuth2 process with Box.com, so that you can receive an access token. I recommend the box-passport module to help with this.
var Box = require('nodejs-box');
var box = new Box({
access_token: 'YOUR_ACCESS_TOKEN_GOES_HERE',
refreh_token: 'YOUR_REFRESH_TOKEN_GOES_HERE'
});
Check out the tests for more usage examples.
Returns info given a folder ID
Returns info for the root folder (ID '0')
Creates a new folder, given a name and the ID of the parent folder
Deletes a folder, given a folder ID. Optionally takes a second argument, 'recursive', that holds a boolean value, which, if true, will delete the folder even if it is not empty.
Uploads a file given a path and a folder ID
Creates a shared link for a file
Create metadata for a given file (ID)
Note: Your app/account has to be authorized for the Metadata API beta to use this.
Run export access_token='YOUR_TOKEN_GOES_HERE' && npm test