An effortless interface for FullContact, using node-request.
In terminal:
npm install fullcontact.js
In your JavaScript:
var FullContact = require('fullcontact.js')
, fc = new FullContact('your_api_key');
function your_callback(response) {
// handle returned data
}
fc.person({email: 'garbados@gmail.com'}, your_callback);
The response
param given to your callback is a JavaScript object built by parsing the JSON returned by FullContact. So, a simple callback might be:
function simple_callback(response) {
console.log(response.status); // prints the response code your call returned.
}
Check out FullContact's documentation here.
To run the test suite, then do this after installing the library:
npm test fullcontact.js your_api_key
If you entered a valid API key as a command-line argument, the tests should (as of this writing) pass. They pass silently, so if you run the tests and nothing prints, you're good.