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

akismet

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

akismet

Akismet API client for node.js

  • 2.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.2K
decreased by-23.96%
Maintainers
1
Weekly downloads
 
Created
Source

An Akismet API client for node.js.

NPM version License

Travis Build Status AppVeyor Build status Dev Dependency Status Code Coverage

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.

Keywords

FAQs

Package last updated on 02 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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