Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clevertap

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clevertap

CleverTap API library for node

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8K
decreased by-10.73%
Maintainers
1
Weekly downloads
 
Created
Source

clevertap-node

CI Status

Fully async Node.js server module for accessing the CleverTap Server API

Install

npm install clevertap

Usage


// require the library
const CleverTap = require('clevertap');

// init the library with your CleverTap Account Id and CleverTap Account Passcode
const clevertap = CleverTap.init(YOUR_CLEVERTAP_ACCOUNT_ID, YOUR_CLEVERTAP_ACCOUNT_PASSCODE);

// the library supports both callbacks and Promises

// upload an array of event/profile records callback style
clevertap.upload(data, {"debug":1, batchSize:50}, (res) => {console.log(res)});

// or if you prefer Promises
clevertap.upload(data, {"debug":1, batchSize:50}).then( (res) => {console.log(res)} );

// query for events
var query = {"event_name":"choseNewFavoriteFood",
              "props": 
                [{"name":"value","operator":"contains", "value":"piz"}],
              "from": 20150810,
              "to": 20151025
            };

//callback style
clevertap.events(query, {debug:1, batchSize:500}, (res) => {console.log(res)});

// or if you prefer Promises
clevertap.events(query, {debug:1, batchSize:500}).then( (res) => {console.log(res)} );

//query for user profiles
var query = {"event_name":"choseNewFavoriteFood",
              "props": 
                [{"name":"value","operator":"contains", "value":"piz"}],
              "from": 20150810,
              "to": 20151025
            }

//callback style
clevertap.profiles(query, {debug:1, batchSize:200}, (res) => {console.log(res)});

// or if you prefer Promises
clevertap.profiles(query, {debug:1, batchSize:200}).then( (res) => {console.log(res)} );

See example.js for more detailed usage.

Also please see our Server API documentation.

Tests

npm install  
npm test

Keywords

FAQs

Package last updated on 11 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc