hMollom-0.2.2: Library to interact with the Mollom anti-spam serviceSource codeContentsIndex
Network.Mollom
Description
Interface to the Mollom API
Synopsis
getServerList :: MollomMonad [String]
checkContent :: Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> Maybe String -> MollomMonad [(String, MollomValue)]
sendFeedback :: String -> MollomMonad Bool
getImageCaptcha :: Maybe String -> MollomMonad [(String, MollomValue)]
getAudioCaptcha :: Maybe String -> MollomMonad [(String, MollomValue)]
checkCaptcha :: String -> Maybe String -> MollomMonad Bool
getStatistics :: String -> MollomMonad Int
verifyKey :: MollomMonad Bool
detectLanguage :: String -> MollomMonad [[(String, MollomValue)]]
addBlacklistText :: String -> String -> String -> MollomMonad Bool
removeBlacklistText :: String -> MollomMonad Bool
listBlacklistText :: MollomMonad [[(String, MollomValue)]]
addBlacklistURL :: String -> MollomMonad Bool
removeBlacklistURL :: String -> MollomMonad Bool
listBlacklistURL :: MollomMonad [[(String, MollomValue)]]
data MollomConfiguration = MollomConfiguration {
mcPublicKey :: String
mcPrivateKey :: String
mcAPIVersion :: String
}
data MollomValue
= MInt Int
| MBool Bool
| MDouble Double
| MString String
Documentation
getServerList :: MollomMonad [String]Source
request a list of Mollom servers that can handle a site's calls.
checkContentSource
:: Maybe StringCurrent session ID
-> Maybe StringTitle of submitted post
-> Maybe StringBody of submitted post
-> Maybe StringSubmitting user's name or nick
-> Maybe StringSubmitting user's URL
-> Maybe StringSubmitting user's email address
-> Maybe StringSubmitting user's openID
-> Maybe StringSubmitting user's current IP
-> Maybe StringSubmitting user's unique site ID
-> MollomMonad [(String, MollomValue)]The monad in which the function is executing
asks Mollom whether the specified message is legitimate.
sendFeedbackSource
:: Stringfeedback: spam, profanity, low-quality or unwanted
-> MollomMonad Boolalways returns true
tells Mollom that the specified message was spam or otherwise abusive.
getImageCaptchaSource
:: Maybe Stringauthor IP address
-> MollomMonad [(String, MollomValue)]session ID and CAPTCHA url
requests Mollom to generate a image CAPTCHA.
getAudioCaptchaSource
:: Maybe Stringauthor IP address
-> MollomMonad [(String, MollomValue)]
requests Mollom to generate an audio CAPTCHA
checkCaptchaSource
:: Stringsolution to the CAPTCHA
-> Maybe Stringauthor IP address
-> MollomMonad Bool
requests Mollom to verify the result of a CAPTCHA.
getStatisticsSource
:: Stringtype 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.
-> MollomMonad IntValue of requested statistic
retrieves usage statistics from Mollom.
verifyKeySource
:: MollomMonad BoolAlways returns True
return a status value.
detectLanguageSource
:: Stringtext to analyse
-> MollomMonad [[(String, MollomValue)]]list of (language, confidence) tuples
analyze text and return its most likely language code.
addBlacklistTextSource
:: Stringtext to blacklist
-> Stringmatch used to search for the text, either exact or contains
-> Stringreason: spam, profanity, low-quality, or unwanted
-> MollomMonad Boolalways returns True
add text to your site's custom text blacklist.
removeBlacklistTextSource
:: Stringtext to blacklist
-> MollomMonad Boolalways returns True
remove text from your site's custom text blacklist.
listBlacklistTextSource
:: MollomMonad [[(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 text blacklist.
addBlacklistURLSource
:: StringURL to be added to custom URL blacklist for the website identified by the public and private keypair
-> MollomMonad Boolalways returns True
add a URL to your site's custom URL blacklist.
removeBlacklistURLSource
:: StringURL to be removed from the custom URL blacklist for the website identified by the public and private keypair
-> MollomMonad Boolalways returns True
remove a URL from your site's custom URL blacklist.
listBlacklistURLSource
:: MollomMonad [[(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 MollomConfiguration Source
Constructors
MollomConfiguration
mcPublicKey :: String
mcPrivateKey :: String
mcAPIVersion :: String
show/hide Instances
data MollomValue Source
Constructors
MInt Int
MBool Bool
MDouble Double
MString String
show/hide Instances
Produced by Haddock version 2.7.2