rapleaf

rapleaf client

Rapleaf client

Just a thin request wrapper for rapleaf

npm install rapleaf
var Rapleaf = require('rapleaf')
  , client  = new Rapleaf('a908DOTxP'); // Pass in a key

client.queryByEmail('john.doe@hotmail.com', function(error, response, body) {
  if (!error) {
    console.log(body); // { age: '35-44', gender: 'Male' }
  }
});

// Narrow results by providing 'postal' or 'optional' parameters inside of an options object
var options = {
  first: 'John'
, last: 'Doe'
, show_available: true
};
client.queryByEmail('john.doe@hotmail.com', options, function(error, response, body) {
  if (!error) {
    console.log(body); // { age: '35-44', gender: 'Male' }
  }
});

Create a new Rapleaf client

  • email - string
  • options - object (postal or optional parameters such as first, last name, zip)
  • callback - function(error, response, body)
  • md5 - string
  • options - object
  • callback - function(error, response, body)
  • sha1 - string
  • options - object
  • callback - function(error, response, body)
npm test

MIT