Added docs.

This commit is contained in:
Erik C. Thauvin 2020-03-05 22:46:41 -08:00
parent de1b5caef4
commit fc4b25bda4
60 changed files with 829 additions and 0 deletions

View file

@ -1,4 +1,5 @@
import com.jfrog.bintray.gradle.tasks.BintrayUploadTask import com.jfrog.bintray.gradle.tasks.BintrayUploadTask
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.io.FileInputStream import java.io.FileInputStream
import java.net.URL import java.net.URL
@ -115,6 +116,30 @@ val javadocJar by tasks.creating(Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP group = JavaBasePlugin.DOCUMENTATION_GROUP
} }
val dokkaDocs by tasks.creating(DokkaTask::class) {
outputFormat = "gfm"
outputDirectory = "$projectDir"
configuration {
moduleName = "docs"
sourceLink {
path = file("$projectDir/src/main/kotlin").toURI().toString().replace("file:", "")
url = "https://github.com/ethauvin/${project.name}/tree/master/src/main/kotlin"
lineSuffix = "#L"
}
jdkVersion = 8
externalDocumentationLink {
url = URL("https://javaee.github.io/javaee-spec/javadocs/")
packageListUrl = URL("https://javaee.github.io/javaee-spec/javadocs/package-list")
}
includes = listOf("config/dokka/packages.md")
includeNonPublic = false
}
}
tasks { tasks {
withType<Test> { withType<Test> {
useTestNG() useTestNG()

View file

@ -2,4 +2,8 @@
[Akismet for Kotlin/Java](https://github.com/ethauvin/akismet-kotlin), a client library for accessing the [Automattic Kismet](https://www.akismet.com/) (Akismet) spam comments filtering service. [Akismet for Kotlin/Java](https://github.com/ethauvin/akismet-kotlin), a client library for accessing the [Automattic Kismet](https://www.akismet.com/) (Akismet) spam comments filtering service.
# package net.thauvin.erik.akismet
A Kotlin/Java library for accessing the Akismet service.

22
docs/alltypes/index.md Normal file
View file

@ -0,0 +1,22 @@
[Akismet for Kotlin/Java](https://github.com/ethauvin/akismet-kotlin), a client library for accessing the [Automattic Kismet](https://www.akismet.com/) (Akismet) spam comments filtering service.
### All Types
| Name | Summary |
|---|---|
|
##### [net.thauvin.erik.akismet.Akismet](../net.thauvin.erik.akismet/-akismet/index.md)
Provides access to the [Akismet API](https://akismet.com/development/api/).
|
##### [net.thauvin.erik.akismet.AkismetComment](../net.thauvin.erik.akismet/-akismet-comment/index.md)
A comment to send to Akismet.

13
docs/index.md Normal file
View file

@ -0,0 +1,13 @@
[docs](./index.md)
[Akismet for Kotlin/Java](https://github.com/ethauvin/akismet-kotlin), a client library for accessing the [Automattic Kismet](https://www.akismet.com/) (Akismet) spam comments filtering service.
### Packages
| Name | Summary |
|---|---|
| [net.thauvin.erik.akismet](net.thauvin.erik.akismet/index.md) | A Kotlin/Java library for accessing the Akismet service. |
### Index
[All Types](alltypes/index.md)

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [ADMIN_ROLE](./-a-d-m-i-n_-r-o-l-e.md)
# ADMIN_ROLE
`const val ADMIN_ROLE: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L93)
Administrator role. If used, Akismet will always return false.

View file

@ -0,0 +1,37 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [&lt;init&gt;](./-init-.md)
# &lt;init&gt;
`AkismetComment(request: `[`HttpServletRequest`](https://javaee.github.io/javaee-spec/javadocs/javax/servlet/http/HttpServletRequest.html)`)`
Create an Akismet comment extracting the [userIp](user-ip.md), [userAgent](user-agent.md), [referrer](referrer.md) and [serverEnv](server-env.md) environment variables
from a Servlet request.
See the
[Akismet API](https://akismet.com/development/api/#comment-check) for more details.
**See Also**
[serverEnv](server-env.md)
`AkismetComment(userIp: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, userAgent: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`
Create an Akismet comment instance.
See the [Akismet API](https://akismet.com/development/api/#comment-check) for more details.
### Parameters
`userIp` - IP address of the comment submitter.
`userAgent` - User agent string of the web browser submitting the comment.
**Constructor**
Create an Akismet comment instance.
See the [Akismet API](https://akismet.com/development/api/#comment-check) for more details.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [TYPE_BLOG_POST](./-t-y-p-e_-b-l-o-g_-p-o-s-t.md)
# TYPE_BLOG_POST
`const val TYPE_BLOG_POST: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L72)
A blog post.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [TYPE_COMMENT](./-t-y-p-e_-c-o-m-m-e-n-t.md)
# TYPE_COMMENT
`const val TYPE_COMMENT: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L63)
A blog comment.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [TYPE_CONTACT_FORM](./-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.md)
# TYPE_CONTACT_FORM
`const val TYPE_CONTACT_FORM: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L75)
A contact form or feedback form submission.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [TYPE_FORUM_POST](./-t-y-p-e_-f-o-r-u-m_-p-o-s-t.md)
# TYPE_FORUM_POST
`const val TYPE_FORUM_POST: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L66)
A top-level forum post.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [TYPE_MESSAGE](./-t-y-p-e_-m-e-s-s-a-g-e.md)
# TYPE_MESSAGE
`const val TYPE_MESSAGE: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L81)
A message sent between just a few users.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [TYPE_PINGBACK](./-t-y-p-e_-p-i-n-g-b-a-c-k.md)
# TYPE_PINGBACK
`const val TYPE_PINGBACK: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L84)
A pingback.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [TYPE_REPLY](./-t-y-p-e_-r-e-p-l-y.md)
# TYPE_REPLY
`const val TYPE_REPLY: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L69)
A reply to a top-level forum post.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [TYPE_SIGNUP](./-t-y-p-e_-s-i-g-n-u-p.md)
# TYPE_SIGNUP
`const val TYPE_SIGNUP: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L78)
A new user account.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [TYPE_TRACKBACK](./-t-y-p-e_-t-r-a-c-k-b-a-c-k.md)
# TYPE_TRACKBACK
`const val TYPE_TRACKBACK: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L87)
A trackback.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [TYPE_TWEET](./-t-y-p-e_-t-w-e-e-t.md)
# TYPE_TWEET
`const val TYPE_TWEET: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L90)
A Twitter message.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [authorEmail](./author-email.md)
# authorEmail
`var authorEmail: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L138)
Email address submitted with the comment.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [authorUrl](./author-url.md)
# authorUrl
`var authorUrl: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L144)
URL submitted with comment.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [author](./author.md)
# author
`var author: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L132)
Name submitted with the comment.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [blogCharset](./blog-charset.md)
# blogCharset
`var blogCharset: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L190)
The character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1

View file

@ -0,0 +1,10 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [blogLang](./blog-lang.md)
# blogLang
`var blogLang: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L182)
Indicates the language(s) in use on the blog or site, in ISO 639-1 format, comma-separated.
A site with articles in English and French might use: `en, fr_ca`

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [content](./content.md)
# content
`var content: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L150)
The content that was submitted.

View file

@ -0,0 +1,14 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [dateGmt](./date-gmt.md)
# dateGmt
`var dateGmt: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L162)
The UTC timestamp of the creation of the comment, in ISO 8601 format.
May be omitted if the comment is sent to the API at the time it is created.
**See Also**
[Akismet.dateToGmt](../-akismet/date-to-gmt.md)

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [equals](./equals.md)
# equals
`open fun equals(other: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L269)
Indicates whether some other object is *equal to* this one.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [hashCode](./hash-code.md)
# hashCode
`open fun hashCode(): `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L300)
Returns a hash code value for the object.

View file

@ -0,0 +1,66 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](./index.md)
# AkismetComment
`open class AkismetComment` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L59)
A comment to send to Akismet.
Most everything is optional. Performance can drop dramatically if you choose to exclude data points. The more data
you send Akismet about each comment, the greater the accuracy. They recommend erring on the side of including
too much data.
See the [Akismet API](https://akismet.com/development/api/#comment-check) for more details.
### Constructors
| Name | Summary |
|---|---|
| [&lt;init&gt;](-init-.md) | Create an Akismet comment extracting the [userIp](user-ip.md), [userAgent](user-agent.md), [referrer](referrer.md) and [serverEnv](server-env.md) environment variables from a Servlet request.`AkismetComment(request: `[`HttpServletRequest`](https://javaee.github.io/javaee-spec/javadocs/javax/servlet/http/HttpServletRequest.html)`)`<br>Create an Akismet comment instance.`AkismetComment(userIp: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, userAgent: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` |
### Properties
| Name | Summary |
|---|---|
| [author](author.md) | Name submitted with the comment.`var author: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [authorEmail](author-email.md) | Email address submitted with the comment.`var authorEmail: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [authorUrl](author-url.md) | URL submitted with comment.`var authorUrl: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [blogCharset](blog-charset.md) | The character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1`var blogCharset: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [blogLang](blog-lang.md) | Indicates the language(s) in use on the blog or site, in ISO 639-1 format, comma-separated.`var blogLang: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [content](content.md) | The content that was submitted.`var content: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [dateGmt](date-gmt.md) | The UTC timestamp of the creation of the comment, in ISO 8601 format.`var dateGmt: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [isTest](is-test.md) | This is an optional parameter. You can use it when submitting test queries to Akismet.`var isTest: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [permalink](permalink.md) | The full permanent URL of the entry the comment was submitted to.`var permalink: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [postModifiedGmt](post-modified-gmt.md) | The UTC timestamp of the publication time for the post, page or thread on which the comment was posted.`var postModifiedGmt: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [recheckReason](recheck-reason.md) | If you are sending content to Akismet to be rechecked, such as a post that has been edited or old pending comments that you'd like to recheck, include this parameter with a string describing why the content is being rechecked.`var recheckReason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [referrer](referrer.md) | The content of the referer header should be set here.`var referrer: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [serverEnv](server-env.md) | In PHP, there is an array of environmental variables called `$_SERVER` that contains information about the Web server itself as well as a key/value for every HTTP header sent with the request. This data is highly useful to Akismet.`var serverEnv: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` |
| [type](type.md) | A string that describes the type of content being sent, such as:`var type: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
| [userAgent](user-agent.md) | User agent string of the web browser submitting the comment.`val userAgent: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [userIp](user-ip.md) | IP address of the comment submitter.`val userIp: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [userRole](user-role.md) | The user role of the user who submitted the comment. This is an optional parameter.`var userRole: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` |
### Functions
| Name | Summary |
|---|---|
| [equals](equals.md) | Indicates whether some other object is *equal to* this one.`open fun equals(other: `[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [hashCode](hash-code.md) | Returns a hash code value for the object.`open fun hashCode(): `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) |
| [toJson](to-json.md) | Returns a JSON representation of the comment.`fun toJson(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [toString](to-string.md) | Returns a JSON representation of the comment.`open fun toString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
### Companion Object Properties
| Name | Summary |
|---|---|
| [ADMIN_ROLE](-a-d-m-i-n_-r-o-l-e.md) | Administrator role. If used, Akismet will always return false.`const val ADMIN_ROLE: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [TYPE_BLOG_POST](-t-y-p-e_-b-l-o-g_-p-o-s-t.md) | A blog post.`const val TYPE_BLOG_POST: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [TYPE_COMMENT](-t-y-p-e_-c-o-m-m-e-n-t.md) | A blog comment.`const val TYPE_COMMENT: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [TYPE_CONTACT_FORM](-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.md) | A contact form or feedback form submission.`const val TYPE_CONTACT_FORM: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [TYPE_FORUM_POST](-t-y-p-e_-f-o-r-u-m_-p-o-s-t.md) | A top-level forum post.`const val TYPE_FORUM_POST: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [TYPE_MESSAGE](-t-y-p-e_-m-e-s-s-a-g-e.md) | A message sent between just a few users.`const val TYPE_MESSAGE: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [TYPE_PINGBACK](-t-y-p-e_-p-i-n-g-b-a-c-k.md) | A pingback.`const val TYPE_PINGBACK: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [TYPE_REPLY](-t-y-p-e_-r-e-p-l-y.md) | A reply to a top-level forum post.`const val TYPE_REPLY: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [TYPE_SIGNUP](-t-y-p-e_-s-i-g-n-u-p.md) | A new user account.`const val TYPE_SIGNUP: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [TYPE_TRACKBACK](-t-y-p-e_-t-r-a-c-k-b-a-c-k.md) | A trackback.`const val TYPE_TRACKBACK: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [TYPE_TWEET](-t-y-p-e_-t-w-e-e-t.md) | A Twitter message.`const val TYPE_TWEET: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [isTest](./is-test.md)
# isTest
`var isTest: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L206)
This is an optional parameter. You can use it when submitting test queries to Akismet.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [permalink](./permalink.md)
# permalink
`var permalink: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L103)
The full permanent URL of the entry the comment was submitted to.

View file

@ -0,0 +1,12 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [postModifiedGmt](./post-modified-gmt.md)
# postModifiedGmt
`var postModifiedGmt: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L172)
The UTC timestamp of the publication time for the post, page or thread on which the comment was posted.
**See Also**
[Akismet.dateToGmt](../-akismet/date-to-gmt.md)

View file

@ -0,0 +1,12 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [recheckReason](./recheck-reason.md)
# recheckReason
`var recheckReason: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L215)
If you are sending content to Akismet to be rechecked, such as a post that has been edited or old pending
comments that you'd like to recheck, include this parameter with a string describing why the content is
being rechecked.
For example: `edit`

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [referrer](./referrer.md)
# referrer
`var referrer: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L97)
The content of the referer header should be set here.

View file

@ -0,0 +1,13 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [serverEnv](./server-env.md)
# serverEnv
`var serverEnv: `[`Map`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html)`<`[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L228)
In PHP, there is an array of environmental variables called `$_SERVER` that contains information about the Web
server itself as well as a key/value for every HTTP header sent with the request. This data is highly useful to
Akismet.
How the submitted content interacts with the server can be very telling, so please include as much of it as
possible.

View file

@ -0,0 +1,12 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [toJson](./to-json.md)
# toJson
`fun toJson(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L252)
Returns a JSON representation of the comment.
**See Also**
[Akismet.jsonComment](../-akismet/json-comment.md)

View file

@ -0,0 +1,12 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [toString](./to-string.md)
# toString
`open fun toString(): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L261)
Returns a JSON representation of the comment.
**See Also**
[Akismet.jsonComment](../-akismet/json-comment.md)

View file

@ -0,0 +1,23 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [type](./type.md)
# type
`var type: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L126)
A string that describes the type of content being sent, such as:
* [TYPE_COMMENT](-t-y-p-e_-c-o-m-m-e-n-t.md)
* [TYPE_FORUM_POST](-t-y-p-e_-f-o-r-u-m_-p-o-s-t.md)
* [TYPE_REPLY](-t-y-p-e_-r-e-p-l-y.md)
* [TYPE_BLOG_POST](-t-y-p-e_-b-l-o-g_-p-o-s-t.md)
* [TYPE_CONTACT_FORM](-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.md)
* [TYPE_SIGNUP](-t-y-p-e_-s-i-g-n-u-p.md)
* [TYPE_MESSAGE](-t-y-p-e_-m-e-s-s-a-g-e.md)
* [TYPE_PINGBACK](-t-y-p-e_-p-i-n-g-b-a-c-k.md)
* [TYPE_TRACKBACK](-t-y-p-e_-t-r-a-c-k-b-a-c-k.md)
* [TYPE_TWEET](-t-y-p-e_-t-w-e-e-t.md)
You may send a value not listed above if none of them accurately describe your content.
This is further explained [here](http://blog.akismet.com/2012/06/19/pro-tip-tell-us-your-comment_type/).

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [userAgent](./user-agent.md)
# userAgent
`val userAgent: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L59)
User agent string of the web browser submitting the comment.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [userIp](./user-ip.md)
# userIp
`val userIp: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L59)
IP address of the comment submitter.

View file

@ -0,0 +1,10 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [userRole](./user-role.md)
# userRole
`var userRole: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt#L200)
The user role of the user who submitted the comment. This is an optional parameter.
If you set it to [ADMIN_ROLE](-a-d-m-i-n_-r-o-l-e.md), Akismet will always return false.

View file

@ -0,0 +1,15 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [&lt;init&gt;](./-init-.md)
# &lt;init&gt;
`Akismet(apiKey: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, blog: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`
Create a new instance using an [Akismet](https://www.askimet.com/) API key and URL registered with Akismet.
`Akismet(apiKey: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`
Creates new instance using the provided [Akismet](https://www.askimet.com/) API key.
**Constructor**
Creates new instance using the provided [Akismet](https://www.askimet.com/) API key.

View file

@ -0,0 +1,18 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [appUserAgent](./app-user-agent.md)
# appUserAgent
`var appUserAgent: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L126)
The application user agent to be sent to Akismet.
If possible, the application user agent string should always use the following format:
```
Application Name/Version
```
The library's own user agent string will automatically be appended.
See the [Akismet API](https://akismet.com/development/api/#detailed-docs) for more details.

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [blog](./blog.md)
# blog
`var blog: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L107)
The URL registered with Akismet.

View file

@ -0,0 +1,25 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [checkComment](./check-comment.md)
# checkComment
`@JvmOverloads fun checkComment(comment: `[`AkismetComment`](../-akismet-comment/index.md)`, trueOnError: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L275)
Comment Check.
This is the call you will make the most. It takes a number of arguments and characteristics about the submitted
content and then returns a thumbs up or thumbs down. Performance can drop dramatically if you choose to exclude
data points. The more data you send Akismet about each comment, the greater the accuracy. They recommend erring
on the side of including too much data
By default, if an error (IO, empty response from Akismet, etc.) occurs the function will return `false` and
log the error, use the `trueOnError` parameter to change this behavior.
See the [Akismet API](https://akismet.com/development/api/#comment-check) for more details.
### Parameters
`trueOnError` - Set to return `true` on error.
**Return**
`true` if the comment is spam, `false` if the comment is not.

View file

@ -0,0 +1,24 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [dateToGmt](./date-to-gmt.md)
# dateToGmt
`@JvmStatic fun dateToGmt(date: `[`Date`](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html)`): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L78)
Convert a date to a UTC timestamp. (ISO 8601)
**See Also**
[AkismetComment.dateGmt](../-akismet-comment/date-gmt.md)
[AkismetComment.postModifiedGmt](../-akismet-comment/post-modified-gmt.md)
`@JvmStatic fun dateToGmt(date: `[`LocalDateTime`](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html)`): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L91)
Convert a locale date/time to a UTC timestamp. (ISO 8601)
**See Also**
[AkismetComment.dateGmt](../-akismet-comment/date-gmt.md)
[AkismetComment.postModifiedGmt](../-akismet-comment/post-modified-gmt.md)

View file

@ -0,0 +1,16 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [debugHelp](./debug-help.md)
# debugHelp
`var debugHelp: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L199)
The `x-akismet-debug-help` header from the last operation, if any.
If the call returns neither `true` nor `false`, the `x-akismet-debug-help` header will provide context for any
error that has occurred.
Note that the `x-akismet-debug-help` header will not always be sent if a response does not return `false`
or `true`.
See the [Akismet API](https://akismet.com/development/api/#comment-check) for more details.

View file

@ -0,0 +1,14 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [errorMessage](./error-message.md)
# errorMessage
`var errorMessage: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L159)
The error message.
The error (IO, empty response from Akismet, etc.) message is also logged as a warning.
**See Also**
[Akismet.checkComment](check-comment.md)

View file

@ -0,0 +1,15 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [executeMethod](./execute-method.md)
# executeMethod
`@JvmOverloads fun executeMethod(apiUrl: HttpUrl?, formBody: FormBody, trueOnError: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L329)
Execute a call to an Akismet REST API method.
### Parameters
`apiUrl` - The Akismet API URL endpoint. (e.g. https://rest.akismet.com/1.1/verify-key)
`formBody` - The HTTP POST form body containing the request parameters to be submitted.
`trueOnError` - Set to return `true` on error (IO, empty response, etc.)

View file

@ -0,0 +1,8 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [httpStatusCode](./http-status-code.md)
# httpStatusCode
`var httpStatusCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L140)
The [HTTP status code](https://www.restapitutorial.com/httpstatuscodes.html) of the last operation.

View file

@ -0,0 +1,46 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](./index.md)
# Akismet
`open class Akismet` [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L59)
Provides access to the [Akismet API](https://akismet.com/development/api/).
### Constructors
| Name | Summary |
|---|---|
| [&lt;init&gt;](-init-.md) | Create a new instance using an [Akismet](https://www.askimet.com/) API key and URL registered with Akismet.`Akismet(apiKey: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, blog: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)`<br>Creates new instance using the provided [Akismet](https://www.askimet.com/) API key.`Akismet(apiKey: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` |
### Properties
| Name | Summary |
|---|---|
| [appUserAgent](app-user-agent.md) | The application user agent to be sent to Akismet.`var appUserAgent: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [blog](blog.md) | The URL registered with Akismet.`var blog: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [debugHelp](debug-help.md) | The `x-akismet-debug-help` header from the last operation, if any.`var debugHelp: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [errorMessage](error-message.md) | The error message.`var errorMessage: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [httpStatusCode](http-status-code.md) | The [HTTP status code](https://www.restapitutorial.com/httpstatuscodes.html) of the last operation.`var httpStatusCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) |
| [isDiscard](is-discard.md) | Set to true if Akismet has determined that the last [checked comment](check-comment.md) is blatant spam, and you can safely discard it without saving it in any spam queue.`var isDiscard: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [isVerifiedKey](is-verified-key.md) | Check if the API Key has been verified`var isVerifiedKey: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [logger](logger.md) | The logger instance.`val logger: `[`Logger`](https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html) |
| [proTip](pro-tip.md) | The `x-akismet-pro-tip` header from the last operation, if any.`var proTip: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [response](response.md) | The actual response sent by Akismet from the last operation.`var response: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
### Functions
| Name | Summary |
|---|---|
| [checkComment](check-comment.md) | Comment Check.`fun checkComment(comment: `[`AkismetComment`](../-akismet-comment/index.md)`, trueOnError: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [executeMethod](execute-method.md) | Execute a call to an Akismet REST API method.`fun executeMethod(apiUrl: HttpUrl?, formBody: FormBody, trueOnError: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = false): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [reset](reset.md) | Reset the [debugHelp](debug-help.md), [errorMessage](error-message.md), [httpStatusCode](http-status-code.md), [isDiscard](is-discard.md), [isVerifiedKey](is-verified-key.md), [proTip](pro-tip.md), and [response](response.md) properties.`fun reset(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) |
| [submitHam](submit-ham.md) | Submit Ham. (False Positives)`fun submitHam(comment: `[`AkismetComment`](../-akismet-comment/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [submitSpam](submit-spam.md) | Submit Spam. (Missed Spam)`fun submitSpam(comment: `[`AkismetComment`](../-akismet-comment/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [verifyKey](verify-key.md) | Key Verification.`fun verifyKey(): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
### Companion Object Functions
| Name | Summary |
|---|---|
| [dateToGmt](date-to-gmt.md) | Convert a date to a UTC timestamp. (ISO 8601)`fun dateToGmt(date: `[`Date`](https://docs.oracle.com/javase/8/docs/api/java/util/Date.html)`): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)<br>Convert a locale date/time to a UTC timestamp. (ISO 8601)`fun dateToGmt(date: `[`LocalDateTime`](https://docs.oracle.com/javase/8/docs/api/java/time/LocalDateTime.html)`): `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [jsonComment](json-comment.md) | (Re)Create a [comment](../-akismet-comment/index.md) from a JSON string.`fun jsonComment(json: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`AkismetComment`](../-akismet-comment/index.md) |

View file

@ -0,0 +1,15 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [isDiscard](./is-discard.md)
# isDiscard
`var isDiscard: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L185)
Set to true if Akismet has determined that the last [checked comment](check-comment.md) is blatant spam, and you
can safely discard it without saving it in any spam queue.
See the [Akismet API](https://akismet.com/development/api/#comment-check) for more details.
**See Also**
[Akismet.proTip](pro-tip.md)

View file

@ -0,0 +1,12 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [isVerifiedKey](./is-verified-key.md)
# isVerifiedKey
`var isVerifiedKey: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L133)
Check if the API Key has been verified
**See Also**
[Akismet.verifyKey](verify-key.md)

View file

@ -0,0 +1,12 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [jsonComment](./json-comment.md)
# jsonComment
`@JvmStatic fun jsonComment(json: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`): `[`AkismetComment`](../-akismet-comment/index.md) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L67)
(Re)Create a [comment](../-akismet-comment/index.md) from a JSON string.
**See Also**
[AkismetComment.toString](../-akismet-comment/to-string.md)

View file

@ -0,0 +1,12 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [logger](./logger.md)
# logger
`val logger: `[`Logger`](https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L205)
The logger instance.
**Getter**
The logger instance.

View file

@ -0,0 +1,17 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [proTip](./pro-tip.md)
# proTip
`var proTip: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L173)
The `x-akismet-pro-tip` header from the last operation, if any.
If the `x-akismet-pro-tip` header is set to discard, then Akismet has determined that the comment is blatant
spam, and you can safely discard it without saving it in any spam queue.
See the [Akismet API](https://akismet.com/development/api/#comment-check) for more details.
**See Also**
[Akismet.isDiscard](is-discard.md)

View file

@ -0,0 +1,9 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [reset](./reset.md)
# reset
`fun reset(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L378)
Reset the [debugHelp](debug-help.md), [errorMessage](error-message.md), [httpStatusCode](http-status-code.md), [isDiscard](is-discard.md), [isVerifiedKey](is-verified-key.md), [proTip](pro-tip.md), and
[response](response.md) properties.

View file

@ -0,0 +1,10 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [response](./response.md)
# response
`var response: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L149)
The actual response sent by Akismet from the last operation.
For example: `true`, `false`, `valid`, `invalid`, etc.

View file

@ -0,0 +1,24 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [submitHam](./submit-ham.md)
# submitHam
`fun submitHam(comment: `[`AkismetComment`](../-akismet-comment/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L317)
Submit Ham. (False Positives)
This call is intended for the submission of false positives - items that were incorrectly classified as spam by
Akismet. It takes identical arguments as [comment check](check-comment.md) and
[submit spam](submit-spam.md).
It is very important that the values you submit with this call match those of your
[comment check](check-comment.md) calls as closely as possible. In order to learn from its mistakes,
Akismet needs to match your missed spam and false positive reports to the original comment-check API calls made
when the content was first posted. While it is normal for less information to be available for submit-spam and
submit-ham calls (most comment systems and forums will not store all metadata), you should ensure that the
values that you do send match those of the original content.
See the [Akismet API](https://akismet.com/development/api/#submit-ham) for more details.
**Return**
`true` if the comment was submitted, `false` otherwise.

View file

@ -0,0 +1,22 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [submitSpam](./submit-spam.md)
# submitSpam
`fun submitSpam(comment: `[`AkismetComment`](../-akismet-comment/index.md)`): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L295)
Submit Spam. (Missed Spam)
This call is for submitting comments that weren't marked as spam but should have been.
It is very important that the values you submit with this call match those of your
[comment check](check-comment.md) calls as closely as possible. In order to learn from its mistakes,
Akismet needs to match your missed spam and false positive reports to the original comment-check API calls made
when the content was first posted. While it is normal for less information to be available for submit-spam and
submit-ham calls (most comment systems and forums will not store all metadata), you should ensure that the
values that you do send match those of the original content.
See the [Akismet API](https://akismet.com/development/api/#submit-spam) for more details.
**Return**
`true` if the comment was submitted, `false` otherwise.

View file

@ -0,0 +1,22 @@
[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [verifyKey](./verify-key.md)
# verifyKey
`fun verifyKey(): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/ethauvin/akismet-kotlin/tree/master/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt#L249)
Key Verification.
Key verification authenticates your key before calling the [comment check](check-comment.md),
[submit spam](submit-spam.md), or [submit ham](submit-ham.md) methods. This is the first call that you
should make to Akismet and is especially useful if you will have multiple users with their own Akismet
subscriptions using your application.
See the [Akismet API](https://akismet.com/development/api/#verify-key) for more details.
**Return**
`true` if the key is valid, `false` otherwise.
**See Also**
[Akismet.isVerifiedKey](is-verified-key.md)

View file

@ -0,0 +1,12 @@
[docs](../index.md) / [net.thauvin.erik.akismet](./index.md)
## Package net.thauvin.erik.akismet
A Kotlin/Java library for accessing the Akismet service.
### Types
| Name | Summary |
|---|---|
| [Akismet](-akismet/index.md) | Provides access to the [Akismet API](https://akismet.com/development/api/).`open class Akismet` |
| [AkismetComment](-akismet-comment/index.md) | A comment to send to Akismet.`open class AkismetComment` |

4
docs/package-list Normal file
View file

@ -0,0 +1,4 @@
$dokka.format:gfm
$dokka.linkExtension:md
net.thauvin.erik.akismet