Package Exports
- akismet
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (akismet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
An Akismet API client for node.js.
Installation:
npm install akismetUsage:
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. See http://www.akismet.com/development/api/#verify-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 the comments. See http://www.akismet.com/development/api/#comment-check
akismet.checkSpam({
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 checkSpam.
See http://www.akismet.com/development/api/#submit-spam
and http://www.akismet.com/development/api/#submit-ham
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.');
});