node-cannedio

1.0.1 • Public • Published

node-cannedio

Canned.IO API Wrapper for NodeJS.

Check the node-cannedio API Documentation or REST API Documentation

1 - Signup/Signin

2 - Getting the Access Token.

Notice: Only a superuser account might access the developer tab, make sure you are using a right account and let's get started.

  • Go to the "Settings".
  • Click on "Developer" tab.
  • Now click on "API Token". This will copy the token.
  • Done! Now you have the access token.

3 - Using the node-cannedio module.

  • Download and install NodeJS in https://nodejs.org
  • Install the node-cannedio module: $npm install node-cannedio
  • Create canned-test.js file.
  • Paste the following code replacing MY_API_TOKEN by your real API Token:
const CannedIO = require('node-cannedio');

// try to setup the canned.io module.
const token = 'MY_API_TOKEN';
const setupError = CannedIO.config.setup(token);

// check any error.
if (setupError) {
  console.error('Error on try to setup:', setupError);
  process.exit();
}

// get the user list
CannedIO.api.user
.list()
.then(list => console.log('I got a list with', list.length, 'users'))
.catch(error => console.error('Error on try to load users:', error));

Readme

Keywords

none

Package Sidebar

Install

npm i node-cannedio

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

1.36 MB

Total Files

82

Last publish

Collaborators

  • morceli