Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "clearbit", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Client for Clearbit.co business intelligence APIs", | ||
@@ -5,0 +5,0 @@ "main": "./src", |
@@ -5,2 +5,3 @@ 'use strict'; | ||
var resource = require('./resource'); | ||
var _ = require('lodash'); | ||
@@ -16,3 +17,13 @@ function requireEmail (options) { | ||
}) | ||
.on('preFind', requireEmail); | ||
.on('preFind', requireEmail) | ||
.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)); | ||
} | ||
}); | ||
@@ -19,0 +30,0 @@ exports.PersonCompany = resource.create('PersonCompany', { |
@@ -30,3 +30,8 @@ 'use strict'; | ||
.then(function (data) { | ||
return new this(data); | ||
return new this( | ||
_.extend({}, data, { | ||
_options: this._options, | ||
client: this.client | ||
}) | ||
); | ||
}) | ||
@@ -52,3 +57,3 @@ .catch(isQueued, function () { | ||
}; | ||
_.extend(Resource, new EventEmitter(), EventEmitter.prototype, ClearbitResource, createErrors(name), { | ||
@@ -70,4 +75,9 @@ _name: name, | ||
return this; | ||
}, | ||
include: function (props) { | ||
_.extend(Resource.prototype, props); | ||
return this; | ||
} | ||
}); | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11181
194