intercom-api-wrapper
Light wrapper around intercom.io's API requests to abstract out intercom-specific methods
Install
npm install mongodb-js-intercom
var intercom = ;
Example
The wrapper exposes three basic functions getUsers
, getUsersBySegment
, and getCount
.
;
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
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
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