hMollom-0.1.1: Library to interact with the Mollom anti-spam service

Network.Mollom

Description

Interface to the Mollom API

Synopsis

Documentation

getServerListSource

Arguments

:: MollomConn

connection to the Mollom service

-> IO [String]

list of servers that can be used

request a list of Mollom servers that can handle a site's calls.

checkContentSource

Arguments

:: MollomConn

connection to the Mollom service

-> [(String, String)]

data

-> IO [(String, MollomValue)]

contains spam decision and session ID

asks Mollom whether the specified message is legitimate.

sendFeedbackSource

Arguments

:: MollomConn

connection to the Mollom service

-> String

session ID

-> String

feedback: spam, profanity, low-quality or unwanted

-> IO Bool

always returns True

tells Mollom that the specifieed message was spam or otherwise abusive.

getImageCaptchaSource

Arguments

:: MollomConn

connection to the Mollom service

-> Maybe String

session ID

-> Maybe String

author IP address

-> IO [(String, MollomValue)]

session ID and CAPTCHA url

requests Mollom to generate a image CAPTCHA.

getAudioCaptchaSource

Arguments

:: MollomConn

connection to the Mollom service

-> Maybe String

session ID

-> Maybe String

author IP address

-> IO [(String, MollomValue)]

session ID and CAPTCHA url

requests Mollom to generate an audio CAPTCHA

checkCaptchaSource

Arguments

:: MollomConn

connection to the Mollom service

-> String

session ID associated with the CAPTCHA

-> String

solution to the CAPTCHA

-> IO Bool

True if correct, False if wrong

requests Mollom to verify the result of a CAPTCHA.

getStatisticsSource

Arguments

:: MollomConn

connection to the Mollom service

-> String

type of statistics demanded total_days  Number of days Mollom has been used. total_accepted  Total accepted posts. total_rejected  Total rejected spam posts. yesterday_accepted  Number of posts accepted yesterday. yesterday_rejected  Number of spam posts blocked yesterday. today_accepted  Number of posts accepted today. today_rejected  Number of spam posts rejected today.

-> IO Int

Value of requested statistic

retrieves usage statistics from Mollom.

verifyKeySource

Arguments

:: MollomConn

connection to the Mollom service

-> IO Bool

Always returns True

return a status value.

detectLanguageSource

Arguments

:: MollomConn

connection to the Mollom service

-> String

text to analyse -> IO [[DetectLanguageResponseStruct]] -- ^list of (language, confidence) tuples

-> IO [[(String, MollomValue)]]

list of (language, confidence) tuples

analyze text and return its most likely language code.

addBlacklistTextSource

Arguments

:: MollomConn

connection to the Mollom service

-> String

text to blacklist

-> String

match used to search for the text, either exact or contains

-> String

reason: spam, profanity, low-quality, or unwanted

-> IO Bool

always returns True

add text to your site's custom text blacklist.

removeBlacklistTextSource

Arguments

:: MollomConn

connection to the Mollom service

-> String

text to blacklist

-> IO Bool

always returns True

remove text from your site's custom text blacklist.

listBlacklistTextSource

Arguments

:: MollomConn

connection to the Mollom service -> IO [[(String, MollomValue)]] -- ^List of the current blacklisted URLs for the website corresponding to the public and private keypair

-> IO ()

List of the current blacklisted URLs for the website corresponding to the public and private keypair

return the contents of your site's custom text blacklist.

addBlacklistURLSource

Arguments

:: MollomConn

connection to the Mollom service

-> String

URL to be added to custom URL blacklist for the website identified by the public and private keypair

-> IO Bool

always returns True

add a URL to your site's custom URL blacklist.

removeBlacklistURLSource

Arguments

:: MollomConn

connection to the Mollom service

-> String

URL to be removed from the custom URL blacklist for the website identified by the public and private keypair

-> IO Bool

always returns True

remove a URL from your site's custom URL blacklist.

listBlacklistURLSource

Arguments

:: MollomConn

connection to the Mollom service

-> IO [[(String, MollomValue)]]

List of the current blacklisted URLs for the website corresponding to the public and private keypair

return the contents of your site's custom URL blacklist.

data MollomConn Source

Describes connection with the Mollom server