# Akismet

open class Akismet (apiKey: String )(source)

Provides access to the Akismet API.

## Constructors

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

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

constructor(apiKey: String )

Creates a new instance using the provided Akismet API key.

## Types

Companion
Link copied to clipboard
object Companion

## 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

The HTTP status code of the last operation.

isDiscard
Link copied to clipboard
var isDiscard : Boolean

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

Set to `true` 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.

## Functions

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

Comment Check.

executeMethod
Link copied to clipboard
fun executeMethod (apiUrl: <Error class: unknown class>, formBody: <Error class: unknown class>, trueOnError: Boolean = false): Boolean

Executes a call to an Akismet REST API method.

reset
Link copied to clipboard
fun reset ()

Resets the debugHelp, errorMessage, httpStatusCode, isDiscard, isVerifiedKey, proTip, and response properties.

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

Submit Ham. (False Positives)

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

Submit Spam. (Missed Spam)

verifyKey
Link copied to clipboard
fun verifyKey (): Boolean

Key Verification.