gochime

Node.js wrapper for the GoChime API.

npm install gochime
2 downloads in the last day
13 downloads in the last week
133 downloads in the last month

gochime-api

GoChime API wrapper for Node.js. To use the API, you will first need to create an account at GoChime.

install

npm install gochime

test your api token

var gochime = require('gochime');
gochime.test('MY_API_TOKEN', function (err, res) {
  if (err) { throw err; }
  console.log(res); // should log { success: true }
});

use

var gochime = require('gochime');
gochime.use('MY_API_TOKEN');
gochime.addUsers('MY_AUDIENCE_ID', ['jim@jimbo.com'], 'email', function (err, res) {
  if (err) { throw err; }
  console.log(res); // should log { success: true }
});

add users of multiple types

var gochime = require('gochime');
gochime.use('MY_API_TOKEN');
gochime.addFormattedUsers('MY_AUDIENCE_ID', [{ email: 'jim@jimbo.com'}, { email: 'tim@jimbo.com'}, { phone: '5555555555'}, { fbuid: '585191676' }], function (err, res) {
  if (err) { throw err; }
  console.log(res); // should log { success: true }
});

run tests

First, create a conf.js file in the package's root directory. It should look like this:

module.exports = {
    token: "YOUR_TOKEN"
  , testAudience: "YOUR_AUDIENCE_ID"
}

Then run:

node test.js

The response should be:

{ success: true }
{ success: true }
{ success: true }
npm loves you