Akismet

open class Akismet(apiKey: String)

Provides access to the Akismet API.

Constructors

Akismet
Link copied to clipboard
fun Akismet(apiKey: String, blog: String)
Create a new instance using an Akismet API key and URL registered with Akismet.
Akismet
Link copied to clipboard
fun Akismet(apiKey: String)
Creates new instance using the provided Akismet API key.

Types

Companion
Link copied to clipboard
object Companion

Functions

checkComment
Link copied to clipboard
fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean
Comment Check.
executeMethod
Link copied to clipboard
fun executeMethod(apiUrl: HttpUrl?, formBody: FormBody, trueOnError: Boolean = false): Boolean
Execute a call to an Akismet REST API method.
reset
Link copied to clipboard
fun reset()
submitHam
Link copied to clipboard
fun submitHam(comment: AkismetComment): Boolean
Submit Ham.
submitSpam
Link copied to clipboard
fun submitSpam(comment: AkismetComment): Boolean
Submit Spam.
verifyKey
Link copied to clipboard
fun verifyKey(): Boolean
Key Verification.

Properties

appUserAgent
Link copied to clipboard
var appUserAgent: String
The application user agent to be sent to Akismet.
blog
Link copied to clipboard
var blog: String
The URL registered with Akismet.
debugHelp
Link copied to clipboard
var debugHelp: String
The x-akismet-debug-help header from the last operation, if any.
errorMessage
Link copied to clipboard
var errorMessage: String
The error message.
httpStatusCode
Link copied to clipboard
var httpStatusCode: Int = 0
The HTTP status code of the last operation.
isDiscard
Link copied to clipboard
var isDiscard: Boolean = false
Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.
isVerifiedKey
Link copied to clipboard
var isVerifiedKey: Boolean = false
Check if the API Key has been verified
logger
Link copied to clipboard
val logger: Logger
The logger instance.
proTip
Link copied to clipboard
var proTip: String
The x-akismet-pro-tip header from the last operation, if any.
response
Link copied to clipboard
var response: String
The actual response sent by Akismet from the last operation.