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

zcapp

v2.1.4

Published

Zoho creator API node sdk

Downloads

5

Readme

ZCApp

travis build Commitizen friendly

Introduction

Zoho Creator CRUD API node driver connects to app scope and then APIs like create,update,delete and view records can be invoked in method chaining approach. All APIs returns promise.

Getting Started

  • npm install zcapp

CRUD functions

Response Structure

All response structures are common


{
	actualresponse:'// holds actual response sent by creator',
	data:'null if status failed otherwise holds proper parsed response',
	status:"success or failed"
}

Example

Create Record API

var ZCapp = require('zcapp');
var app = new ZCapp({
	appName:'appLinkName',
	ownername:'zc_ownername',
	authtoken:process.env.ZCTOKEN
})

var formdata = {
	title:"Test data",
	description:"description",
	task_type:"feat"
	

}

//Create Record API
app.form('formLinkName').add(formdata)
	.then((response) => {
		/* sample response
			{
			    "actualresponse": {
			        "formname": [
			            "formLinkName",
			            {
			                "operation": [
			                    "add",
			                    {
			                        "values": {
			                            "description": "description",
			                            "ID": 1946659000002034343,
			                            "title": "Test data",
			                            "task_type": "feat"
			                        },
			                        "status": "Success"
			                    }
			                ]
			            }
			        ]
			    },
			    "data": {
			        "description": "description",
			        "ID": 1946659000002034343,
			        "title": "Test data",
			        "task_type": "feat"
			    },
			    "status": "success"
			}

		*/
		
	
	})
	.catch(e =>{
		console.log('CATCH ',e)
	})

Update Record API

//Update Record API
var criteria ={
	task_type:"feat",
	title:{
		op:"=="
		value:"test"
	}

}

app.form('formLinkName').update(formdata,criteria)
	.then((response) =>{
		/* sample response
			"actualresponse": {
		        "formname": [
		            "formLinkName",
		            {
		                "operation": [
		                    "update",
		                    {
		                        "criteria": "task_type==\"feat\"",
		                        "newvalues": [
		                            {
		                                "description": "Test",
		                                "title": "Test Task",
		                                "task_type": "feat"
		                            }
		                        ],
		                        "status": "Success"
		                    }
		                ]
		            }
		        ]
		    },
		    "data": {
		        "updatedvalues": [
		            {
		                "description": "Test",
		                "title": "Test Task",
		                "task_type": "feat"
		            }
		        ],
		        "criteria": "task_type==\"feat\""
		    },
		    "status": "success"
		*/
	})

View Record API

//View Record API
var criteria ={
	task_type:"feat",
	title:{
		op:"=="
		value:"test"
	}

}
// params criteria,startingIndex and limit are optional
app.view('formLinkName','viewLinkName').find(criteria,startingIndex,limit)
	.then((response) =>{
		/* sample response
		{
			"actualresponse": {
		
		        "formLinkName": [
		            {
		                "description": "Test",
		                "ID": 1946659000002032000,
		                "title": "Test Task",
		                "task_type": "feat"
		            }
		       	]
		    },
		    "data": [{
		        "description": "Test",
		        "ID": 1946659000002032000,
		        "title": "Test Task",
		        "task_type": "feat"
		    }],
		    "status": "success",
		    "recordCount": 1
		}

		*/
	})
// instead of array it returns an object in data key
app.view('formLinkName','viewLinkName').findOne(criteria)
	.then((response) =>{
		/* sample response
		{
			"actualresponse": {
		
		        "tasks": [
		            {
		                "description": "Test",
		                "ID": 1946659000002032000,
		                "title": "Test Task",
		                "task_type": "feat"
		            }
		       	]
		    },
		    "data": {
		        "description": "Test",
		        "ID": 1946659000002032000,
		        "title": "Test Task",
		        "task_type": "feat"
		    },
		    "status": "success",
		    "recordCount": 1
		}

		*/
	})

Delete Record API

//Delete Record API
var delete_criteria = {
	task_type:"feat"
}

app.form('formLinkName').delete(delete_criteria)
	.then((response) =>{
		/* sample response
			{
				"actualresponse": {
			        "formname": [
			            "tasks",
			            {
			                "operation": [
			                    "delete",
			                    {
			                        "criteria": "task_type==\"feat\"",
			                        "status": "Success"
			                    }
			                ]
			            }
			        ]
			    },
			    "data": {
			        "criteria": "task_type==\"feat\"",
			        "status": "Success"
			    },
			    "status": "success"
			}
		*/

	})

Exception Handling

Exceptions are handled using catch followed by then functions, refere bluebird promise for more details. Here is sample code for catching exceptions in APIs

app.form('formLinkName').delete(delete_criteria)
	.then((response) =>{
		console.log('response',response)
	})
	.catch((err) =>{
		console.log('error',err)
	})