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 🙏

© 2024 – Pkg Stats / Ryan Hefner

zoho

v1.0.0

Published

Node.js client library for Zoho

Downloads

22,975

Readme

zoho-node

Node.js Zoho helper library for integrating Zoho Creator, CRM, Invoice and Support.

npm version Build Status Join the chat at https://gitter.im/4yopping/zoho Inline docs Dependencies

Installation

$ npm install zoho

Features

  • Zoho Creator
  • Zoho CRM
  • Zoho Invoice
  • Zoho Support

API

Zoho

Initialize zoho

var Zoho = require('zoho');

Zoho#CRM(object)

Initialize CRM with an object authtoken

var crm = new Zoho.CRM({
  authtoken: 'bad18eba1ff45jk7858b8ae88a77fa30'
});
getRecords(<string> type, <function> callback):
crm.getRecords('leads', function (err, data) {
  if (err) {
    return console.log(err);
  }

  console.log(data);
});

Zoho#Invoice(object)

Initialize Invoice with an object authtoken

var invoice = new Zoho.Invoice({
  authtoken: 'bad18eba1ff45jk7858b8ae88a77fa30'
});
getRecords(<string> type, <function> callback):
invoice.getRecords('contacts', function (err, data) {
  if (err) {
    return console.log(err);
  }

  console.log(data);
});

Zoho#Support(object)

Initialize Support with an object authtoken

var support = new Zoho.Support({
  authtoken: 'bad18eba1ff45jk7858b8ae88a77fa30'
});
getRecords(<string> type, <function> callback):
support.getRecords('contacts', function (err, data) {
  if (err) {
    return console.log(err);
  }

  console.log(data);
});

Zoho#Creator(object)

Initialize Creator with an object authtoken

var creator = new Zoho.Creator({
  authtoken: 'bad18eba1ff45jk7858b8ae88a77fa30'
});
setCookie(<string> cookie)

Set a cookie for "unofficial" API calls that require direct HTTP schemes.

creator.setCookie('somecookie');
viewRecordsInView(<string> applicationLinkName, <string> viewLinkName, <function> callback):
creator.viewRecordsInView('sample','Employee_View', function (err, data) {
  if (err) {
    return console.log(err);
  }

  console.log(data);
});
addRecords(<string> applicationLinkName, <string> formLinkName, <object> params, <function> callback)

Add records.

See https://www.zoho.com/creator/help/api/rest-api/rest-api-add-records.html

editRecords(<string> applicationLinkName, <string> formLinkName, <object> params, <function> callback)

Edit records.

See https://www.zoho.com/creator/help/api/rest-api/rest-api-edit-records.html

deleteRecords(<string> applicationLinkName, <string> formLinkName, <object> params, <function> callback)

Delete records.

See https://www.zoho.com/creator/help/api/rest-api/rest-api-delete-records.html

viewRecordsInView(<string> applicationLinkName, <string> formLinkName, <object> params, <function> callback)

Get records in view.

See https://www.zoho.com/creator/help/api/rest-api/rest-api-view-records-in-view.html

listFormFields(<string> applicationLinkName, <string> formLinkName, <object> params, <function> callback)

List form fields.

See https://www.zoho.com/creator/help/api/rest-api/rest-api-list-form-fields.html

downloadImage(<string> endpoint, <object> params, <function> callback)

Progmatically downloads a single image from Zoho Creator. Zoho doesn't officially provide support for downloading images or assets. However, this function will interact directly with the download endpoint. This requires a valid cookie to be set prior to requests.


creator.setCookie('somecookie');

creator.downloadImage('/DownloadFile.do', {
  filepath: '/somefilename.JPG',
  sharedBy: '',
  appLinkName: '',
  viewLinkName: '',
  recLinkID: '',
  fieldLinkName: 'Image',
  zcDownloadType: 'image'
}, function (err, data) {
  if (err) { return res.send(err); }

  res.send(new Buffer(data));

});

Reference

##Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

In order to colaborate to this project, create a .testrc file with the contents below to run unit tests:

{
  "crm": {
    "authtoken": "..."
  },
  "invoice": {
    "authtoken": "..."
  },
  "support": {
    "authtoken": "..."
  }
}

License

MIT