Simple wrapper around the Crocodoc API for NodeJS
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples/test
.gitignore
README.md
main.js
multipart-request.js
package.json

README.md

Node API client for Crocodoc

This is a very simple wrapper over the Crocodoc Web API. Pretty must just maps to what's available in the Crocodoc API docs

Installation

npm install node-crocodoc

Requires request.

Usage

var Crocodoc = require("node-crocodoc");

// instaniate an instance of the API with some default options
var crocodoc = new Crocodoc({
	token: "[KEY GOES HERE],
	async: false,
	private: false,
	editable: false,
	downloadable: true
});

var uuid = [some uuid];

// get private access to a document
crocodoc.getSession(uuid, { private: true }, function(err, session) {
	console.log(session);
});

// same method - defaults to default options set in the constructor
crocodoc.getSession(uuid, function(err, session) {
	console.log(session);
});

// delete a document
crocodoc.delete(uuid, function(err, res) {
	console.log(res);
});

// check the status of a document (you can also pass in an array of uuids)
crocodoc.stats(uuid, function(err, res) {
	console.log(res);
});