Akismet

open class Akismet(apiKey: String)

Provides access to the Akismet API.

Constructors

Link copied to clipboard
fun Akismet(apiKey: String, blog: String)

Creates a new instance using an Akismet API key and URL registered with Akismet.

Link copied to clipboard
fun Akismet(apiKey: String)

Creates a new instance using the provided Akismet API key.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean

Comment Check.

Link copied to clipboard
fun executeMethod(    apiUrl: HttpUrl,     formBody: FormBody,     trueOnError: Boolean = false): Boolean

Executes a call to an Akismet REST API method.

Link copied to clipboard
fun reset()
Link copied to clipboard
fun submitHam(comment: AkismetComment): Boolean

Submit Ham. (False Positives)

Link copied to clipboard
fun submitSpam(comment: AkismetComment): Boolean

Submit Spam. (Missed Spam)

Link copied to clipboard
fun verifyKey(): Boolean

Key Verification.

Properties

Link copied to clipboard
var appUserAgent: String

The application user agent to be sent to Akismet.

Link copied to clipboard
var blog: String

The URL registered with Akismet.

Link copied to clipboard
var debugHelp: String

The x-akismet-debug-help header from the last operation, if any.

Link copied to clipboard
var errorMessage: String

The error message.

Link copied to clipboard
var httpStatusCode: Int = 0

The HTTP status code of the last operation.

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.

Link copied to clipboard
var isVerifiedKey: Boolean = false

Set to true if the API Key has been verified.

Link copied to clipboard
val logger: Logger

The logger instance.

Link copied to clipboard
var proTip: String

The x-akismet-pro-tip header from the last operation, if any.

Link copied to clipboard
var response: String

The actual response sent by Akismet from the last operation.

Sources

Link copied to clipboard