2.0.7 • Published 2 years ago
akismet v2.0.7
An Akismet API client for node.js.
Installation:
npm install --save akismet
Usage:
You need to sign up for an Akismet API key to use the API. Once you sign up, it would be a good idea to verify your key.
var akismet = require('akismet').client({ blog: 'http://my.blog.com', apiKey: 'myakismetapikey123' });
akismet.verifyKey(function(err, verified) {
if (verified)
console.log('API key successfully verified.');
else
console.log('Unable to verify API key.');
});
You can now use Akismet to moderate your comments.
akismet.checkComment({
user_ip: '1.1.1.1',
permalink: 'http://www.my.blog.com/my-post',
comment_author: 'spammer',
comment_content: 'spamming your comments'
}, function(err, spam) {
if(spam)
console.log('Spam caught.');
else
console.log('Not spam');
});
You can also send feedback to Akismet with submitSpam
and submitHam
. Their usage is the same as checkComment
.
akismet.submitSpam({
user_ip: '1.1.1.1',
permalink: 'http://www.my.blog.com/my-post',
comment_author: 'spammer',
comment_content: 'that was spam but you failed to catch me'
}, function(err) {
console.log('Spam reported to Akismet.');
});
See the wiki and Akismet API documentation for more information.
2.0.7
2 years ago
2.0.6
4 years ago
2.0.5
5 years ago
2.0.4
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.0
9 years ago
0.0.13
10 years ago
0.0.12
10 years ago
0.0.11
10 years ago
0.0.10
10 years ago
0.0.9
10 years ago
0.0.8
10 years ago
0.0.6
13 years ago
0.0.5
13 years ago
0.0.4
13 years ago
0.0.3
13 years ago
0.0.2
13 years ago
0.0.1
13 years ago