mongodb-js-intercom v0.1.1
intercom-api-wrapper

Light wrapper around intercom.io's API requests to abstract out intercom-specific methods
Install
npm install mongodb-js-intercomvar intercom = require('mongodb-js-intercom');Example
The wrapper exposes three basic functions getUsers, getUsersBySegment, and getCount.
getUsers(<lastNumDays>, callback);getUsers returns a list of users. Expects an integer for lastNumDays and a callback - lastNumDays limits the return results to only users created in the last lastNumDays days, omit this parameter to get all users ever created.
getUsersBySegment(<segment>, callback);getUsersBySegment returns a list of users that are in a specified segment. Expects a string for segment and a callback - segment should be an existing segment in Intercom.
getCount(<type>, <count>, callback);getCount returns a list of key + count pairs, Expects a string for type and count and a callback - type determines the unit of grouping (company, segment, tag, users) and count determines how to bucket the units
License
Apache 2.0