Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "clearbit", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Client for Clearbit.co business intelligence APIs", | ||
@@ -5,0 +5,0 @@ "main": "./src", |
@@ -23,2 +23,3 @@ 'use strict'; | ||
this.Watchlist = require('./watchlist').Watchlist(this); | ||
this.WatchlistCandidate = require('./watchlist').WatchlistCandidate(this); | ||
this.WatchlistEntity = require('./watchlist').WatchlistEntity(this); | ||
@@ -25,0 +26,0 @@ this.WatchlistIndividual = require('./watchlist').WatchlistIndividual(this); |
@@ -43,2 +43,16 @@ 'use strict'; | ||
ClearbitResource.del = function (path, options) { | ||
options = _.extend({ | ||
path: path, | ||
method: 'delete' | ||
}, this.options, options); | ||
return this.client.request(options) | ||
.bind(this) | ||
.then(cast) | ||
.catch(isUnknownRecord, function () { | ||
throw new this.NotFoundError(this.name + ' not found'); | ||
}); | ||
}; | ||
exports.create = function (name, options) { | ||
@@ -45,0 +59,0 @@ var Resource = function () { |
@@ -31,1 +31,21 @@ 'use strict'; | ||
}); | ||
exports.WatchlistCandidate = resource.create('WatchlistCandidate', { | ||
api: 'watchlist' | ||
}).extend({ | ||
destroy: function(){ | ||
return this.constructor.del('/candidates/' + this.id); | ||
} | ||
}, { | ||
all: function(options) { | ||
return this.get('/candidates', options); | ||
}, | ||
create: function(options) { | ||
return this.post('/candidates', options); | ||
}, | ||
find: function(id, options) { | ||
return this.get('/candidates/' + id, options); | ||
} | ||
}); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
13238
269
1