Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

akismet-api

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

akismet-api - npm Package Compare versions

Comparing version 2.2.0 to 3.0.0

test/callbacks.spec.js

17

CHANGELOG.md

@@ -0,1 +1,18 @@

3.0.0
=====
* Feature: Added official support for Node 8.x
* Feature: Added official support for Node 7.x
* Feature: Added support for `is_test` in `submitHam` and `submitSpam`
* Feature: Added test suite for the client promise API
* Feature: Requests to Akismet now default to HTTPS
* Feature: Added `protocol` option to the constructor
* Patch: Updated superagent to 3.0.0
* Patch: Updated nock to 9.0.6
* Patch: Updated chai to 4.0.1
* Patch: Updated mocha to 3.4.1
* Patch: Removed dependency on `setimmediate`
* **Breaking:** Removed support for Node 0.8. Node 0.8 reached end-of-life a
very long time ago, you should upgrade if you are still using it.
2.2.0

@@ -2,0 +19,0 @@ =====

14

lib/akismet.js

@@ -13,3 +13,2 @@

require('setimmediate'); // Shim to support setImmediate in Node 0.8.x
Promise.promisifyAll(request);

@@ -27,5 +26,6 @@

this.port = options.port || 80;
this.version = options.version || '1.1';
this.protocol = options.protocol || 'https';
this.host = options.host || 'rest.akismet.com';
this.version = options.version || '1.1';
this.endpoint = options.endpoint || this.key + '.' + this.host + '/' + this.version + '/';
this.endpoint = options.endpoint || this.protocol + '://' + this.key + '.' + this.host + '/' + this.version + '/';
this.userAgent = options.userAgent || 'Node.js/' + process.version + ' | Akismet-api/' + pjson.version;

@@ -38,3 +38,3 @@

this.verifyKey = function(cb) {
var url = this.host + '/' + this.version + '/verify-key';
var url = this.protocol + '://' + this.host + '/' + this.version + '/verify-key';
return request

@@ -115,3 +115,4 @@ .post(url)

comment_author_email : options.comment_author_email || '',
referrer : options.referrer || options.referer || ''
referrer : options.referrer || options.referer || '',
is_test : options.is_test === true
})

@@ -144,3 +145,4 @@ .set('User-Agent', this.userAgent)

comment_author_email : options.comment_author_email || '',
referrer : options.referrer || options.referer || ''
referrer : options.referrer || options.referer || '',
is_test : options.is_test === true
})

@@ -147,0 +149,0 @@ .set('User-agent', this.userAgent)

The MIT License (MIT)
Copyright (c) 2013 MemoryLeaf Media Inc.
Copyright (c) 2013 Two Story Robot Labs Inc.

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "akismet-api",
"version": "2.2.0",
"description": "Nodejs bindings to the Akismet (http://akismet.com) spam detection service",
"version": "3.0.0",
"description": "Nodejs bindings to the Akismet (https://akismet.com) spam detection service",
"main": "lib/akismet.js",
"dependencies": {
"bluebird": "^3.1.1",
"setimmediate": "^1.0.2",
"superagent": "^2.0.0"
"superagent": "^3.0.0"
},
"devDependencies": {
"chai": "^3.5.0",
"nock": "^0.41.0",
"mocha": "^3.0.2"
"chai": "^4.0.1",
"nock": "^9.0.6",
"mocha": "^3.4.1"
},
"scripts": {
"test": "node_modules/mocha/bin/mocha test/*.spec.js"
"test": "mocha test/*.spec.js"
},

@@ -28,7 +27,7 @@ "repository": {

],
"author": "Christopher Foster <chris.james.foster@gmail.com>",
"author": "Chris Foster <chris.james.foster@gmail.com>",
"license": "MIT",
"engines": {
"node": ">=0.8"
"node": ">=0.10"
}
}

@@ -9,7 +9,7 @@ Akismet-api

Full Nodejs bindings to the Akismet (http://akismet.com) spam detection service.
Full Nodejs bindings to the Akismet (https://akismet.com) spam detection service.
Features:
* Promise and callback support
* Supports node/iojs from 0.8 to 6.1
* Supports node/iojs from 0.10 to 8.0
* Supports all Akismet API features

@@ -20,3 +20,3 @@ * Uses a modern HTTP client

_Upgrading to 2.0?_ You likely don't need to change anything, but check out the [changelog](CHANGELOG.md).
_Upgrading to 3.0?_ You likely don't need to change anything, but check out the [changelog](CHANGELOG.md).

@@ -40,3 +40,3 @@ Installing

key : 'myKey', // Required!
blog : 'http://myblog.com' // Required!
blog : 'https://myblog.com' // Required!
});

@@ -86,8 +86,8 @@ ```

user_agent : 'MyUserAgent 1.0 Webkit', // Required!
referrer : 'http://google.com', // Required!
permalink : 'http://myblog.com/myPost',
referrer : 'https://google.com', // Required!
permalink : 'https://myblog.com/myPost',
comment_type : 'comment',
comment_author : 'John Smith',
comment_author_email : 'john.smith@gmail.com',
comment_author_url : 'http://johnsblog.com',
comment_author_url : 'https://johnsblog.com',
comment_content : 'Very nice blog! Check out mine!',

@@ -114,9 +114,10 @@ is_test : true // Default value is false

user_agent : 'MyUserAgent 1.0 Webkit', // Required!
referrer : 'http://google.com', // Required!
permalink : 'http://myblog.com/myPost',
referrer : 'https://google.com', // Required!
permalink : 'https://myblog.com/myPost',
comment_type : 'comment',
comment_author : 'John Smith',
comment_author_email : 'john.smith@gmail.com',
comment_author_url : 'http://johnsblog.com',
comment_content : 'Very nice blog! Check out mine!'
comment_author_url : 'https://johnsblog.com',
comment_content : 'Very nice blog! Check out mine!',
is_test : true // Default value is false
}, function(err) {

@@ -138,9 +139,10 @@ if (!err) {

user_agent : 'MyUserAgent 1.0 Webkit', // Required!
referrer : 'http://google.com', // Required!
permalink : 'http://myblog.com/myPost',
referrer : 'https://google.com', // Required!
permalink : 'https://myblog.com/myPost',
comment_type : 'comment',
comment_author : 'John Smith',
comment_author_email : 'john.smith@gmail.com',
comment_author_url : 'http://johnsblog.com',
comment_content : 'Very nice blog! Check out mine!'
comment_author_url : 'https://johnsblog.com',
comment_content : 'Very nice blog! Check out mine!',
is_test : true // Default value is false
}, function(err) {

@@ -164,3 +166,4 @@ if (!err) {

Author and maintainer is [Chris Foster](https://github.com/chrisfosterelli). Development was sponsored by [MemoryLeaf Media](https://github.com/memoryleaf).
Author and maintainer is [Chris Foster](https://github.com/chrisfosterelli).
Development was sponsored by [Two Story Robot](https://github.com/twostoryrobot).

@@ -167,0 +170,0 @@ License

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc