Elixir client for the Akismet comment-spam detection API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
lib
test
.gitignore
LICENSE
README.md
mix.exs
mix.lock

README.md

Exkismet

Exkismet is a simple Elixir client for the Akismet.com spam detection API.

Installation

The package can be installed as:

  1. Add exkismet to your list of dependencies in mix.exs:

    def deps do [{:exkismet, "~> 0.0.2"}] end

  2. Ensure exkismet is started before your application:

    def application do [applications: [:exkismet]] end

Configuration

  1. Add the following line to your config.exs file:

    config :exkismet, key: "<your api key>", blog: "http://<yourhosturl>"

Test

   iex -S mix
   iex(1)> Exkismet.Api.verify
   :valid
   iex(2)>

Checking for spam

  Exkismet.Api.comment_check(%{...})  

returns :ham, if the comment appears to be ok, :spam if it's suspicious, and :discard if Akismet is 100% certain that it's looking at spam.

Reporting spam

  Exkismet.Api.submit_spam(%{...})

Reporting ham (non-spam)

  Exkismet.Api.submit_ham(%{...})