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

@ -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.