Commit 732b660e by Alex MacCaw

add flag API to companies

parent 4fa69e48
{ {
"name": "clearbit", "name": "clearbit",
"version": "1.0.6", "version": "1.0.7",
"description": "Client for Clearbit.co business intelligence APIs", "description": "Client for Clearbit.co business intelligence APIs",
"main": "./src", "main": "./src",
"scripts": { "scripts": {
......
...@@ -9,4 +9,13 @@ module.exports = resource.create('Company', { ...@@ -9,4 +9,13 @@ module.exports = resource.create('Company', {
}) })
.on('preFind', function (options) { .on('preFind', function (options) {
assert(options.domain, 'A domain must be provided'); assert(options.domain, 'A domain must be provided');
}).include({
flag: function(params, options){
return this.client.request(_.extend({
api: this._options.api,
method: 'post',
path: _.template('/people/<%= id %>/flag', this),
query: params || {}
}, options));
}
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment