npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

calameo-node-sdk

v0.0.4

Published

Consume Calameo API easily

Readme

calameo-node-sdk

Consume Calameo API easily

Install

To install, run:

npm install calameo-node-sdk --save

Use

now in your own code you can use it with require('calameo-node-sdk')

Instantiate

sdk require to be instantiated wtih at least your apikey and private (secret key)

you can also add any default parameter you want

for e.g :

var calameoSdk = new CalameoSdk({
	apikey: 'your api key',
	secret: 'your private (secret) key',
	output: 'json'
});

Example request

// add a drm single to a subscriber
calameoSdk.addSubscriberDRMSingle({
	login: 'subscriber login',
	subscription_id: 'id of the subscription',
	book_id: 'book code',
	callback: function (response) {
	    // do what you need with the response
	    var resp = response.body.response;
	    if (resp && resp.status === 'error')
	    {
	    	throw new Error(resp.error.message);
	    }
	    else
	    {
	    	console.log(resp.content);
	    }

	    
	}
});

Full API documentation

you can find the full API reference at http://help.calameo.com/

Available methods and their required arguments

// accounts
getAccountInfos: {},
fetchAccountSubscriptions: {},
fetchAccountBooks: {},
fetchAccountSubscribers: {},

// subscriptions
getSubscriptionInfos: {required: ['subscription_id'] },
fetchSubscriptionBooks: {required: ['subscription_id'] },
fetchSubscriptionSubscribers: {required: ['subscription_id']},

// publications
getBookInfos: {required: ['book_id']},
activateBook: {required: ['book_id']},
deactivateBook: {required: ['book_id']},
updateBook: {required: ['book_id']},
deleteBook: {required: ['book_id']},
fetchBookTocs: {required: ['book_id']},
fetchBookComments: {required: ['book_id']},
renewBookPrivateUrl: {required: ['book_id']},

// publishing
publish: {required: ['subscription_id', 'file'], endpoint: 'http://upload.calameo.com/1.0'},
publishFromUrl: {required: ['subscription_id', 'url'],  endpoint: 'http://upload.calameo.com/1.0'},
publishFromText: {required: ['subscription_id', 'text'],  endpoint: 'http://upload.calameo.com/1.0'},
revise: {required: ['book_id', 'file'], endpoint: 'http://upload.calameo.com/1.0'},
reviseFromUrl: {required: ['book_id', 'url', 'subscription_id'],  endpoint: 'http://upload.calameo.com/1.0'},
reviseFromText: {required: ['book_id', 'text', 'subscription_id'],  endpoint: 'http://upload.calameo.com/1.0'},

// subscribers
getSubscriberInfos: {required: ['subscription_id', 'login']},
activateSubscriber: {required: ['subscription_id', 'login']},
deactivateSubscriber: {required: ['subscription_id', 'login']},
addSubscriber: {required: ['subscription_id', 'login']},
updateSubscriber: {required: ['subscription_id', 'login']},
deleteSubscriber: {required: ['subscription_id', 'login']},
fetchSubscriberBooks: {required: ['subscription_id', 'login']},
authSubscriberSession: {required: ['subscription_id', 'login']},
checkSubscriberSession: {required: ['session_id']},
deleteSubscriberSession: {required: ['session_id']},

// drm
fetchSubscriberDRMSingles: {required: ['subscription_id', 'login']},
fetchSubscriberDRMPeriods: {required: ['subscription_id', 'login']},
fetchSubscriberDRMSeries: {required: ['subscription_id', 'login']},
addSubscriberDRMSingle: {required: ['subscription_id', 'login', 'book_id']},
addSubscriberDRMPeriod: {required: ['subscription_id', 'login', 'from', 'to']},
addSubscriberDRMSerie: {required: ['subscription_id', 'login', 'from', 'books']},
updateSubscriberDRMPeriod: {required: ['subscription_id', 'login', 'period_id', 'from', 'to']},
updateSubscriberDRMSerie: {required: ['subscription_id', 'login', 'serie_id', 'from', 'books']},
deleteSubscriberDRMSingle: {required: ['subscription_id', 'login', 'book_id']},
deleteSubscriberDRMPeriod: {required: ['subscription_id', 'login', 'period_id']},
deleteSubscriberDRMSerie: {required: ['subscription_id', 'login', 'serie_id']},
clearSubscriberDRMs: {required: ['subscription_id', 'login']}