ZCApp
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 = ;var app = appName:'appLinkName' ownername:'zc_ownername' authtoken:processenvZCTOKEN var formdata = title:"Test data" description:"description" task_type:"feat" //Create Record APIappform'formLinkName'
Update Record API
//Update Record APIvar criteria = task_type:"feat" title: op:"==" value:"test" appform'formLinkName'
View Record API
//View Record APIvar criteria = task_type:"feat" title: op:"==" value:"test" // params criteria,startingIndex and limit are optionalapp // instead of array it returns an object in data keyapp
Delete Record API
//Delete Record APIvar delete_criteria = task_type:"feat" appform'formLinkName'
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
appform'formLinkName'