Comparing version 2.0.5 to 2.0.6
@@ -42,4 +42,4 @@ "use strict"; | ||
AkismetClient.prototype.checkComment = function (options, callback) { | ||
options.blog = this._blog; | ||
options.user_agent = this._userAgent; | ||
options.blog = options.blog || this._blog; | ||
options.user_agent = options.user_agent || this._userAgent; | ||
this._postRequest(this._endPoint, "/1.1/comment-check", options, function (err, status, body) { | ||
@@ -56,4 +56,4 @@ callback(err, status >= 200 && status < 300 && body === "true"); | ||
AkismetClient.prototype.submitSpam = function (options, callback) { | ||
options.blog = this._blog; | ||
options.user_agent = this._userAgent; | ||
options.blog = options.blog || this._blog; | ||
options.user_agent = options.user_agent || this._userAgent; | ||
this._postRequest(this._endPoint, "/1.1/submit-spam", options, function (err, status, body) { | ||
@@ -70,4 +70,4 @@ callback(err); | ||
AkismetClient.prototype.submitHam = function (options, callback) { | ||
options.blog = this._blog; | ||
options.user_agent = this._userAgent; | ||
options.blog = options.blog || this._blog; | ||
options.user_agent = options.user_agent || this._userAgent; | ||
this._postRequest(this._endPoint, "/1.1/submit-ham", options, function (err, status, body) { | ||
@@ -74,0 +74,0 @@ callback(err); |
{ | ||
"name": "akismet", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"keywords": [ | ||
@@ -30,9 +30,9 @@ "akismet", | ||
"devDependencies": { | ||
"@types/jest": "^24.0.15", | ||
"@types/node": "^12.6.8", | ||
"@types/request": "^2.48.2", | ||
"jest": "^24.8.0", | ||
"@types/jest": "*", | ||
"@types/node": "*", | ||
"@types/request": "*", | ||
"jest": "*", | ||
"ts-jest": "*", | ||
"tslint": "^5.18.0", | ||
"typescript": "^3.5.3" | ||
"tslint": "*", | ||
"typescript": "*" | ||
}, | ||
@@ -50,5 +50,4 @@ "jest": { | ||
"prepublishOnly": "npm run build", | ||
"test": "npm run lint && jest", | ||
"cover": "jest --coverage" | ||
"test": "tsc && jest --coverage" | ||
} | ||
} |
@@ -6,2 +6,7 @@ An [Akismet](http://www.akismet.com/) API client for [node.js](http://nodejs.org/). | ||
[](http://travis-ci.org/oozcitak/akismet-js) | ||
[](https://ci.appveyor.com/project/oozcitak/akismet-js) | ||
[](https://david-dm.org/oozcitak/akismet-js) | ||
[](https://codecov.io/gh/oozcitak/akismet-js) | ||
### Installation: | ||
@@ -8,0 +13,0 @@ |
114581
18
897
63