0.1.13 • Published 4 years ago

zoho-node-sdk v0.1.13

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Zoho Node.js SDK

NPM

dependencies Status devDependencies Status

A simple SDK for using the REST API for Zoho apps. Any inconsistencies in Zoho's various APIs are abstracted away, and a consistent, easy-to-use interface is presented in this SDK.

Examples

Support

Connect

const zoho = require('zoho-node-sdk');

zoho.support('email@website.com', 'authtoken_here', (err, support) => {

});

List tickets

zoho.support('email@website.com', 'authtoken_here', (err, support) => {
  support.tickets('MyOrg', (err, tickets) => {
    console.log(tickets);
  });

  // Or

  support.organization('MyOrg', (err, org) => {
    org.tickets((err, tickets) => {
      console.log(tickets);
    });
  });
});

Reports

Connect and add a row to a table

const zoho = require('zoho-node-sdk');

zoho.reports('email@website.com', 'authtoken_here', (err, reports) => {
  reports.database('MyDB', (err, db) => {
    db.table('MyTable', (err, t) => {
      t.addrow({
        'MyCol': 'MyVal'
      }, (err, rows) => {
        console.log('done');
      });
    });
  });

  // Or

  reports.table('MyDB', 'MyTable', (err, t) => {
    t.addrow({
      'MyCol': 'MyVal'
    }, (err, rows) => {
      console.log('done');
    });
  });
});

Token Generation

Simple tool to generate auth tokens for use with the API for each respective Zoho app. See here for information on deleting auth tokens to revoke access to your apps.

Note: It is possible to generate a single authtoken for multiple scopes, if you wish to use multiple Zoho apps under a single user. This is currently not directly supported by the token generation tool, but you can easily modify the script to use whatever scope(s) you want.

Run

node tool/gentoken.js

Example output

Your ZohoReports/reportsapi auth token: 8d071f5ae72592dd4c6f45414c82c0d7
Your ZohoSupport/supportapi auth token: 895ef8b3c02ab0b2d99d1b028bd78173
0.1.13

4 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago