hunterio
Version:
Hunter.io SDK (unofficial)
55 lines (40 loc) • 915 B
Markdown
is a very thin wrapper on the [Hunter.io docs](https://hunter.io/api/v2/docs).
```javascript
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) {
//
}
)
```
This