Exkismet is a simple Elixir client for the Akismet.com spam detection API.
The package can be installed by adding exkismet to your list of dependencies in mix.exs
:
def deps do
[{:exkismet, "~> 0.0.3"}]
end
iex(1)> Exkismet.Api.verify(key: "mykey")
:valid
Exkismet.comment_check(%Exkismet.Comment{…}, key: "mykey")
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.
Exkismet.Api.submit_spam(%Exkismet.Comment{…}, key: "mykey")
Exkismet.Api.submit_ham(%Exkismet.Comment{…}, key: "mykey")