hunterio
v1.0.0
Published
Hunter.io SDK (unofficial)
Downloads
210
Maintainers
Readme
Docs
This is a very thin wrapper on the Hunter.io docs.
Pattern
var HunterSDK = require('hunterio');
var KEY = 'your api key for hunter.io';
var hunter = new HunterSDK(KEY);
hunter.domainSearch({
domain: 'hubspot.com'
}, function(err, body) {
if (err) {
// handle error
} else {
// Will contain same body as the raw API call
console.log(body);
}
});
More generally, the calls work like this:
Param order:
1. Any path params, as separate params, first.
2. Required, query param hash (include empty object if none)
3. If a POST or PUT, include the body of the request as a plain object
4. The callback to execute on completion.
hunter[<methodNameCamelCase>](
any path params,
like an id,
{
query: param,
hash: values
},
{
postBody: orPutBodyIfApplicable
},
function callback(err, data) {
//
}
)