diff --git a/build.gradle.kts b/build.gradle.kts index 952467d..2ecdba1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ import com.jfrog.bintray.gradle.tasks.BintrayUploadTask +import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import java.io.FileInputStream import java.net.URL @@ -115,6 +116,30 @@ val javadocJar by tasks.creating(Jar::class) { 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 { withType { useTestNG() diff --git a/config/dokka/packages.md b/config/dokka/packages.md index b84caf8..688738d 100644 --- a/config/dokka/packages.md +++ b/config/dokka/packages.md @@ -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. +# package net.thauvin.erik.akismet + +A Kotlin/Java library for accessing the Akismet service. + diff --git a/docs/alltypes/index.md b/docs/alltypes/index.md new file mode 100644 index 0000000..71262c1 --- /dev/null +++ b/docs/alltypes/index.md @@ -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. + + diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..e0b1b1e --- /dev/null +++ b/docs/index.md @@ -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) \ No newline at end of file diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-a-d-m-i-n_-r-o-l-e.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-a-d-m-i-n_-r-o-l-e.md new file mode 100644 index 0000000..a567a6d --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-a-d-m-i-n_-r-o-l-e.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-init-.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-init-.md new file mode 100644 index 0000000..0120971 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-init-.md @@ -0,0 +1,37 @@ +[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [AkismetComment](index.md) / [<init>](./-init-.md) + +# <init> + +`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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-b-l-o-g_-p-o-s-t.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-b-l-o-g_-p-o-s-t.md new file mode 100644 index 0000000..b93f825 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-b-l-o-g_-p-o-s-t.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-c-o-m-m-e-n-t.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-c-o-m-m-e-n-t.md new file mode 100644 index 0000000..84c1dc5 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-c-o-m-m-e-n-t.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.md new file mode 100644 index 0000000..3b10983 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.md new file mode 100644 index 0000000..13f7b30 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-m-e-s-s-a-g-e.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-m-e-s-s-a-g-e.md new file mode 100644 index 0000000..120bd77 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-m-e-s-s-a-g-e.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-p-i-n-g-b-a-c-k.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-p-i-n-g-b-a-c-k.md new file mode 100644 index 0000000..a4fed1b --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-p-i-n-g-b-a-c-k.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-r-e-p-l-y.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-r-e-p-l-y.md new file mode 100644 index 0000000..c135cbd --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-r-e-p-l-y.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-s-i-g-n-u-p.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-s-i-g-n-u-p.md new file mode 100644 index 0000000..4238737 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-s-i-g-n-u-p.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-t-r-a-c-k-b-a-c-k.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-t-r-a-c-k-b-a-c-k.md new file mode 100644 index 0000000..8643403 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-t-r-a-c-k-b-a-c-k.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-t-w-e-e-t.md b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-t-w-e-e-t.md new file mode 100644 index 0000000..e831c8e --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/-t-y-p-e_-t-w-e-e-t.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/author-email.md b/docs/net.thauvin.erik.akismet/-akismet-comment/author-email.md new file mode 100644 index 0000000..ff71cc6 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/author-email.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/author-url.md b/docs/net.thauvin.erik.akismet/-akismet-comment/author-url.md new file mode 100644 index 0000000..7aac7ad --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/author-url.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/author.md b/docs/net.thauvin.erik.akismet/-akismet-comment/author.md new file mode 100644 index 0000000..47d105a --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/author.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/blog-charset.md b/docs/net.thauvin.erik.akismet/-akismet-comment/blog-charset.md new file mode 100644 index 0000000..3fafe04 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/blog-charset.md @@ -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 + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/blog-lang.md b/docs/net.thauvin.erik.akismet/-akismet-comment/blog-lang.md new file mode 100644 index 0000000..e04e4fc --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/blog-lang.md @@ -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` + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/content.md b/docs/net.thauvin.erik.akismet/-akismet-comment/content.md new file mode 100644 index 0000000..d6c5450 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/content.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/date-gmt.md b/docs/net.thauvin.erik.akismet/-akismet-comment/date-gmt.md new file mode 100644 index 0000000..afe199e --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/date-gmt.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/equals.md b/docs/net.thauvin.erik.akismet/-akismet-comment/equals.md new file mode 100644 index 0000000..2c62689 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/equals.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/hash-code.md b/docs/net.thauvin.erik.akismet/-akismet-comment/hash-code.md new file mode 100644 index 0000000..a0621ad --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/hash-code.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/index.md b/docs/net.thauvin.erik.akismet/-akismet-comment/index.md new file mode 100644 index 0000000..4653a84 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/index.md @@ -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 | +|---|---| +| [<init>](-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)`)`
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) | diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/is-test.md b/docs/net.thauvin.erik.akismet/-akismet-comment/is-test.md new file mode 100644 index 0000000..af49fb6 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/is-test.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/permalink.md b/docs/net.thauvin.erik.akismet/-akismet-comment/permalink.md new file mode 100644 index 0000000..3c36968 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/permalink.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.md b/docs/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.md new file mode 100644 index 0000000..54a9ff4 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.md b/docs/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.md new file mode 100644 index 0000000..7c1437b --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.md @@ -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` + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/referrer.md b/docs/net.thauvin.erik.akismet/-akismet-comment/referrer.md new file mode 100644 index 0000000..0eb9867 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/referrer.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/server-env.md b/docs/net.thauvin.erik.akismet/-akismet-comment/server-env.md new file mode 100644 index 0000000..0d7297a --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/server-env.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/to-json.md b/docs/net.thauvin.erik.akismet/-akismet-comment/to-json.md new file mode 100644 index 0000000..6c2cd3b --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/to-json.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/to-string.md b/docs/net.thauvin.erik.akismet/-akismet-comment/to-string.md new file mode 100644 index 0000000..5be0702 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/to-string.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/type.md b/docs/net.thauvin.erik.akismet/-akismet-comment/type.md new file mode 100644 index 0000000..f91a68e --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/type.md @@ -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/). + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/user-agent.md b/docs/net.thauvin.erik.akismet/-akismet-comment/user-agent.md new file mode 100644 index 0000000..2f4e9d2 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/user-agent.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/user-ip.md b/docs/net.thauvin.erik.akismet/-akismet-comment/user-ip.md new file mode 100644 index 0000000..48d7b05 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/user-ip.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet-comment/user-role.md b/docs/net.thauvin.erik.akismet/-akismet-comment/user-role.md new file mode 100644 index 0000000..bc4dabe --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet-comment/user-role.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/-init-.md b/docs/net.thauvin.erik.akismet/-akismet/-init-.md new file mode 100644 index 0000000..15b2f79 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/-init-.md @@ -0,0 +1,15 @@ +[docs](../../index.md) / [net.thauvin.erik.akismet](../index.md) / [Akismet](index.md) / [<init>](./-init-.md) + +# <init> + +`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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/app-user-agent.md b/docs/net.thauvin.erik.akismet/-akismet/app-user-agent.md new file mode 100644 index 0000000..2043255 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/app-user-agent.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/blog.md b/docs/net.thauvin.erik.akismet/-akismet/blog.md new file mode 100644 index 0000000..d31ab8b --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/blog.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/check-comment.md b/docs/net.thauvin.erik.akismet/-akismet/check-comment.md new file mode 100644 index 0000000..504dcda --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/check-comment.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/date-to-gmt.md b/docs/net.thauvin.erik.akismet/-akismet/date-to-gmt.md new file mode 100644 index 0000000..2d42959 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/date-to-gmt.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/-akismet/debug-help.md b/docs/net.thauvin.erik.akismet/-akismet/debug-help.md new file mode 100644 index 0000000..f213bf0 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/debug-help.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/error-message.md b/docs/net.thauvin.erik.akismet/-akismet/error-message.md new file mode 100644 index 0000000..f17c669 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/error-message.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/-akismet/execute-method.md b/docs/net.thauvin.erik.akismet/-akismet/execute-method.md new file mode 100644 index 0000000..667df74 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/execute-method.md @@ -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.) \ No newline at end of file diff --git a/docs/net.thauvin.erik.akismet/-akismet/http-status-code.md b/docs/net.thauvin.erik.akismet/-akismet/http-status-code.md new file mode 100644 index 0000000..ec3dfbe --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/http-status-code.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/index.md b/docs/net.thauvin.erik.akismet/-akismet/index.md new file mode 100644 index 0000000..5ac379d --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/index.md @@ -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 | +|---|---| +| [<init>](-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)`)`
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)
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) | diff --git a/docs/net.thauvin.erik.akismet/-akismet/is-discard.md b/docs/net.thauvin.erik.akismet/-akismet/is-discard.md new file mode 100644 index 0000000..c090ebd --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/is-discard.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/-akismet/is-verified-key.md b/docs/net.thauvin.erik.akismet/-akismet/is-verified-key.md new file mode 100644 index 0000000..5f37c57 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/is-verified-key.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/-akismet/json-comment.md b/docs/net.thauvin.erik.akismet/-akismet/json-comment.md new file mode 100644 index 0000000..e057896 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/json-comment.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/-akismet/logger.md b/docs/net.thauvin.erik.akismet/-akismet/logger.md new file mode 100644 index 0000000..141e9ae --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/logger.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/pro-tip.md b/docs/net.thauvin.erik.akismet/-akismet/pro-tip.md new file mode 100644 index 0000000..2ba0339 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/pro-tip.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/-akismet/reset.md b/docs/net.thauvin.erik.akismet/-akismet/reset.md new file mode 100644 index 0000000..768d27f --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/reset.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/response.md b/docs/net.thauvin.erik.akismet/-akismet/response.md new file mode 100644 index 0000000..f3a9b80 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/response.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/submit-ham.md b/docs/net.thauvin.erik.akismet/-akismet/submit-ham.md new file mode 100644 index 0000000..ba60e72 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/submit-ham.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/submit-spam.md b/docs/net.thauvin.erik.akismet/-akismet/submit-spam.md new file mode 100644 index 0000000..b71cc8c --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/submit-spam.md @@ -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. + diff --git a/docs/net.thauvin.erik.akismet/-akismet/verify-key.md b/docs/net.thauvin.erik.akismet/-akismet/verify-key.md new file mode 100644 index 0000000..c7b6ca2 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/-akismet/verify-key.md @@ -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) + diff --git a/docs/net.thauvin.erik.akismet/index.md b/docs/net.thauvin.erik.akismet/index.md new file mode 100644 index 0000000..d8e9a22 --- /dev/null +++ b/docs/net.thauvin.erik.akismet/index.md @@ -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` | diff --git a/docs/package-list b/docs/package-list new file mode 100644 index 0000000..5f10e95 --- /dev/null +++ b/docs/package-list @@ -0,0 +1,4 @@ +$dokka.format:gfm +$dokka.linkExtension:md + +net.thauvin.erik.akismet