diff --git a/.circleci/config.yml b/.circleci/config.yml index e6c4f38..c781fdc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,55 +1,62 @@ -version: 2 +version: 2.1 + +orbs: + sdkman: joshdholtz/sdkman@0.2.0 + defaults: &defaults working_directory: ~/repo environment: JVM_OPTS: -Xmx3200m TERM: dumb - CI: true + CI_NAME: "CircleCI" -defaults_gradle: &defaults_gradle - steps: - - checkout - - restore_cache: - keys: - - gradle-dependencies-{{ checksum "build.gradle.kts" }} - # fallback to using the latest cache if no exact match is found - - gradle-dependencies- - - run: - name: Gradle Dependencies - command: ./gradlew dependencies - - save_cache: - paths: ~/.m2 - key: gradle-dependencies-{{ checksum "build.gradle.kts" }} - - run: - name: Run All Checks - command: ./gradlew check - - store_artifacts: - path: build/reports/ - destination: reports - - store_test_results: - path: build/reports/ +commands: + build_and_test: + parameters: + reports-dir: + type: string + default: "build/reports/test_results" + steps: + - checkout + - sdkman/setup-sdkman + - sdkman/sdkman-install: + candidate: kotlin + version: 2.1.10 + - run: + name: Download dependencies + command: ./bld download + - run: + name: Compile source + command: ./bld compile + - run: + name: Run tests + command: ./bld jacoco -reports-dir=<< parameters.reports-dir >> + - store_test_results: + path: << parameters.reports-dir >> + - store_artifacts: + path: build/reports/jacoco/test/html jobs: - build_gradle_jdk18: + bld_jdk17: <<: *defaults docker: - - image: cimg/openjdk:18.0 + - image: cimg/openjdk:17.0 - <<: *defaults_gradle + steps: + - build_and_test - build_gradle_jdk11: + bld_jdk21: <<: *defaults docker: - - image: cimg/openjdk:11.0 + - image: cimg/openjdk:21.0 - <<: *defaults_gradle + steps: + - build_and_test workflows: - version: 2 - gradle: - jobs: - - build_gradle_jdk11 - - build_gradle_jdk18 - + bld: + jobs: + - bld_jdk17 + - bld_jdk21 diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml new file mode 100644 index 0000000..be80a2f --- /dev/null +++ b/.github/workflows/bld.yml @@ -0,0 +1,51 @@ +name: bld-ci + +on: [push, pull_request, workflow_dispatch] + +env: + AKISMET_API_KEY: ${{ secrets.AKISMET_API_KEY }} + AKISMET_BLOG: ${{ secrets.AKISMET_BLOG }} + COVERAGE_JDK: "21" + COVERAGE_KOTLIN: "2.0.0" + KOTLIN_HOME: /usr/share/kotlinc + +jobs: + build-bld-project: + runs-on: ubuntu-latest + + strategy: + matrix: + java-version: [17, 21, 24] + kotlin-version: [1.9.25, 2.1.20] + + steps: + - name: Checkout source repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up JDK ${{ matrix.java-version }} with Kotlin ${{ matrix.kotlin-version }} + uses: actions/setup-java@v4 + with: + distribution: "zulu" + java-version: ${{ matrix.java-version }} + + - name: Download dependencies + run: ./bld download + + - name: Compile source + run: ./bld compile + + - name: Run tests + run: ./bld jacoco + + - name: Remove pom.xml + if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN + run: rm -rf pom.xml + + - name: SonarCloud Scan + if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml deleted file mode 100644 index 193e95b..0000000 --- a/.github/workflows/gradle.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: gradle-ci - -on: [ push, pull_request, workflow_dispatch ] - -jobs: - build: - runs-on: ubuntu-latest - - env: - GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m" - SONAR_JDK: "17" - - strategy: - matrix: - java-version: [ 11, 17, 20 ] - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up JDK ${{ matrix.java-version }} - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: ${{ matrix.java-version }} - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Cache SonarCloud packages - if: matrix.java-version == env.SONAR_JDK - uses: actions/cache@v3 - with: - path: ~/.sonar/cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - - name: Test with Gradle - uses: gradle/gradle-build-action@v2 - env: - AKISMET_BLOG: ${{ secrets.AKISMET_BLOG }} - AKISMET_API_KEY: ${{ secrets.AKISMET_API_KEY }} - with: - arguments: build check --stacktrace - - - name: SonarCloud - if: success() && matrix.java-version == env.SONAR_JDK - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./gradlew sonar --info diff --git a/.gitignore b/.gitignore index ac52a18..c6b13e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,84 +1,62 @@ -!.vscode/extensions.json -!.vscode/launch.json -!.vscode/settings.json -!.vscode/tasks.json -*.class -*.code-workspace -*.ctxt -*.iws -*.log -*.nar -*.rar -*.sublime-* -*.tar.gz -*.zip -.DS_Store -.classpath .gradle -.history -.kobalt -.mtj.tmp/ -.mvn/timing.properties -.mvn/wrapper/maven-wrapper.jar -.nb-gradle -.project -.scannerwork -.settings -.vscode/* -/**/.idea/$CACHE_FILE$ -/**/.idea/$PRODUCT_WORKSPACE_FILE$ -/**/.idea/**/caches/build_file_checksums.ser -/**/.idea/**/contentModel.xml -/**/.idea/**/dataSources.ids -/**/.idea/**/dataSources.local.xml -/**/.idea/**/dataSources/ -/**/.idea/**/dbnavigator.xml -/**/.idea/**/dictionaries -/**/.idea/**/dynamic.xml -/**/.idea/**/gradle.xml -/**/.idea/**/httpRequests -/**/.idea/**/libraries -/**/.idea/**/mongoSettings.xml -/**/.idea/**/replstate.xml -/**/.idea/**/shelf -/**/.idea/**/shelf/ -/**/.idea/**/sonarlint* -/**/.idea/**/sqlDataSources.xml -/**/.idea/**/tasks.xml -/**/.idea/**/uiDesigner.xml -/**/.idea/**/usage.statistics.xml -/**/.idea/**/workspace.xml -/**/.idea_modules/ -Thumbs.db -__pycache__ +.DS_Store +build +lib/bld/** +!lib/bld/bld-wrapper.jar +!lib/bld/bld-wrapper.properties +lib/compile/ +lib/runtime/ +lib/provided/ +lib/standalone/ +lib/test/ + +# IDEA ignores + +# User-specific +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin atlassian-ide-plugin.xml -bin/ -build/ -cmake-build-*/ -com_crashlytics_export_strings.xml -crashlytics-build.properties -crashlytics.properties -dependency-reduced-pom.xml -deploy/ -dist/ -ehthumbs.db -fabric.properties -gen/ -hs_err_pid* -kobaltBuild -kobaltw*-test -lib/kotlin* -libs/ + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Editor-based Rest Client +.idea/httpRequests + +bin +deploy +target local.properties -out/ -pom.xml.asc -pom.xml.next -pom.xml.releaseBackup -pom.xml.tag -pom.xml.versionsBackup -proguard-project.txt -project.properties -release.properties -target/ -test-output -venv + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1601b0b..10b9b0f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,31 +1,24 @@ -image: gradle:8-jdk11 +image: fedora:latest variables: - GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m" - -before_script: - - export GRADLE_USER_HOME=`pwd`/.gradle + CI_NAME: "GitLab CI" stages: - - build - test -build: - stage: build - script: gradle --build-cache assemble - cache: - key: "$CI_COMMIT_REF_NAME" - policy: push - paths: - - build - - .gradle +before_script: + - dnf -qy update && dnf -y install zip + - curl -s "https://get.sdkman.io" | bash + - echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config + - echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config + - source "$HOME/.sdkman/bin/sdkman-init.sh" + - sdk install java + - sdk install kotlin + - source "$HOME/.sdkman/bin/sdkman-init.sh" test: stage: test - script: gradle check - cache: - key: "$CI_COMMIT_REF_NAME" - policy: pull - paths: - - build - - .gradle + script: + - ./bld download + - ./bld compile + - ./bld test diff --git a/.idea/app.iml b/.idea/app.iml new file mode 100644 index 0000000..381e063 --- /dev/null +++ b/.idea/app.iml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/bld.iml b/.idea/bld.iml new file mode 100644 index 0000000..e63e11e --- /dev/null +++ b/.idea/bld.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/.idea/encodings.xml b/.idea/bld.xml similarity index 54% rename from examples/.idea/encodings.xml rename to .idea/bld.xml index 97626ba..6600cee 100644 --- a/examples/.idea/encodings.xml +++ b/.idea/bld.xml @@ -1,6 +1,6 @@ - - + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 3ad4dc5..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index fb7f4a8..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/copyright/BSD_3.xml b/.idea/copyright/BSD_3.xml new file mode 100644 index 0000000..ee0e59a --- /dev/null +++ b/.idea/copyright/BSD_3.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/Erik_s_Copyright_Notice.xml b/.idea/copyright/Erik_s_Copyright_Notice.xml deleted file mode 100644 index 9accf79..0000000 --- a/.idea/copyright/Erik_s_Copyright_Notice.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml index 1419e40..3203074 100644 --- a/.idea/copyright/profiles_settings.xml +++ b/.idea/copyright/profiles_settings.xml @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 8ff795e..37eb64c 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -1,53 +1,8 @@ - \ No newline at end of file + diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index dd5077a..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index f8467b4..86ebe4c 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -1,6 +1,18 @@ - - \ No newline at end of file + + + + + + diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml new file mode 100644 index 0000000..a203de8 --- /dev/null +++ b/.idea/libraries/bld.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/compile.xml b/.idea/libraries/compile.xml new file mode 100644 index 0000000..5316b95 --- /dev/null +++ b/.idea/libraries/compile.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/runtime.xml b/.idea/libraries/runtime.xml new file mode 100644 index 0000000..d4069f2 --- /dev/null +++ b/.idea/libraries/runtime.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/test.xml b/.idea/libraries/test.xml new file mode 100644 index 0000000..05f52ce --- /dev/null +++ b/.idea/libraries/test.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 1e1e260..e6cd1a9 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,21 +1,12 @@ - - \ No newline at end of file + diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..55adcb9 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Run Tests.xml b/.idea/runConfigurations/Run Tests.xml new file mode 100644 index 0000000..d46a237 --- /dev/null +++ b/.idea/runConfigurations/Run Tests.xml @@ -0,0 +1,9 @@ + + + + diff --git a/LICENSE.txt b/LICENSE.txt index f2b9abe..d9ceb27 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2019-2022, Erik C. Thauvin (erik@thauvin.net) +Copyright (c) 2019-2025, Erik C. Thauvin (erik@thauvin.net) All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index fb401bc..441e433 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ [![License (3-Clause BSD)](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg?style=flat-square)](https://opensource.org/licenses/BSD-3-Clause) -[![Kotlin](https://img.shields.io/badge/kotlin-1.9.10-7f52ff)](https://kotlinlang.org/) +[![Kotlin](https://img.shields.io/badge/kotlin-2.1.20-7f52ff)](https://kotlinlang.org/) +[![bld](https://img.shields.io/badge/2.2.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld) [![Release](https://img.shields.io/github/release/ethauvin/akismet-kotlin.svg)](https://github.com/ethauvin/akismet-kotlin/releases/latest) [![Nexus Snapshot](https://img.shields.io/nexus/s/net.thauvin.erik/akismet-kotlin?label=snapshot&server=https%3A%2F%2Foss.sonatype.org%2F)](https://oss.sonatype.org/content/repositories/snapshots/net/thauvin/erik/akismet-kotlin/) [![Maven Central](https://img.shields.io/maven-central/v/net.thauvin.erik/akismet-kotlin.svg?color=blue)](https://central.sonatype.com/artifact/net.thauvin.erik/akismet-kotlin) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ethauvin_akismet-kotlin&metric=alert_status)](https://sonarcloud.io/dashboard?id=ethauvin_akismet-kotlin) -[![GitHub CI](https://github.com/ethauvin/akismet-kotlin/actions/workflows/gradle.yml/badge.svg)](https://github.com/ethauvin/akismet-kotlin/actions/workflows/gradle.yml) +[![GitHub CI](https://github.com/ethauvin/akismet-kotlin/actions/workflows/bld.yml/badge.svg)](https://github.com/ethauvin/akismet-kotlin/actions/workflows/bld.yml) [![CircleCI](https://circleci.com/gh/ethauvin/akismet-kotlin/tree/master.svg?style=shield)](https://circleci.com/gh/ethauvin/akismet-kotlin/tree/master) # [Akismet](https://www.akismet.com) for Kotlin, Java and Android @@ -14,20 +15,18 @@ A pretty complete and straightforward implementation of the [Automattic's Akisme ## Examples (TL;DR) -#### Kotlin +### Kotlin ```kotlin val akismet = Akismet(apiKey = "YOUR_API_KEY", blog = "YOUR_BLOG_URL") -val comment = AkismetComment(userIp = "127.0.0.1", userAgent = "curl/7.29.0") - -with(comment) { +val comment = AkismetComment(userIp = "127.0.0.1", userAgent = "curl/7.29.0").apply { referrer = "https://www.google.com" - type = AkismetComment.TYPE_COMMENT + type = CommentType.COMMENT author = "admin" authorEmail = "test@test.com" authorUrl = "https://www.CheckOutMyCoolSite.com" dateGmt = Akismet.dateToGmt(Date()) - content = "It means a lot that you would take the time to review our software." + content = "Thanks for reviewing our software." } // ... @@ -37,21 +36,23 @@ if (isSpam) { } ``` -[View Full Example](https://github.com/ethauvin/akismet-kotlin/blob/master/examples/src/main/kotlin/com/example/AkismetExample.kt) +[View Full Examples](https://github.com/ethauvin/akismet-kotlin/blob/master/examples) -#### Java +### Java ```java final Akismet akismet = new Akismet("YOUR_API_KEY", "YOUR_BLOG_URL"); -final AkismetComment comment = new AkismetComment("127.0.0.1", "curl/7.29.0"); - -comment.setReferrer("https://www.google.com"); -comment.setType(AkismetComment.TYPE_COMMENT); -comment.setAuthor("admin"); -comment.setAuthorEmail("test@test.com"); -comment.setAuthorUrl("https://www.CheckOutMyCoolSite.com"); -comment.setDateGmt(Akismet.dateToGmt(new Date())); -comment.setContent("It means a lot that you would take the time to review our software."); +final AkismetComment comment = new AkismetComment( + new CommentConfig.Builder("127.0.0.1", "curl/7.29.0") + .referrer("https://www.google.com") + .type(CommentType.COMMENT) + .author("admin") + .authorEmail("test@test.com") + .authorUrl("https://www.CheckOutMyCoolSite.com") + .dateGmt(Akismet.dateToGmt(new Date())) + .content("Thanks for reviewing our software.") + .build +); //... final boolean isSpam = akismet.checkComment(comment); @@ -60,11 +61,22 @@ if (isSpam) { } ``` -[View Full Example](https://github.com/ethauvin/akismet-kotlin/blob/master/examples/src/main/java/com/example/AkismetSample.java) +[View Full Examples](https://github.com/ethauvin/akismet-kotlin/blob/master/examples) -### Gradle +## bld -To use with [Gradle](https://gradle.org/), include the following dependency in your [build](https://github.com/ethauvin/akismet-kotlin/blob/master/examples/build.gradle.kts) file: +To use with [bld](https://rife2.com/bld), include the following dependency in your [build](https://github.com/ethauvin/akismet-kotlin/blob/master/examples/bld/src/bld/java/com/example/ExampleBuild.java) file: + +```java +repositories = List.of(MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY); + +scope(compile) + .include(dependency("net.thauvin.erik:akismet-kotlin:1.1.0-SNAPSHOT")); +``` + +## Gradle + +To use with [Gradle](https://gradle.org/), include the following dependency in your [build](https://github.com/ethauvin/akismet-kotlin/blob/master/examples/gradle/build.gradle.kts) file: ```gradle repositories { @@ -72,13 +84,13 @@ repositories { } dependencies { - implementation("net.thauvin.erik:akismet-kotlin:1.0.0") + implementation("net.thauvin.erik:akismet-kotlin:1.1.0-SNAPSHOT") } ``` Instructions for using with Maven, Ivy, etc. can be found on [Maven Central](https://central.sonatype.com/artifact/net.thauvin.erik/akismet-kotlin). -### HttpServletRequest +## HttpServletRequest The more information is sent to Akismet, the more accurate the response is. An [HttpServletRequest](https://javaee.github.io/javaee-spec/javadocs/javax/servlet/http/HttpServletRequest.html) can be used as a parameter so that all the relevant information is automatically included. @@ -88,9 +100,9 @@ AkismetComment(request = context.getRequest()) This will ensure that the user's IP, agent, referrer and various environment variables are automatically extracted from the request. -[View Full Example](https://github.com/ethauvin/akismet-kotlin/blob/master/examples/src/main/kotlin/com/example/AkismetServlet.kt) +[View Full Example](https://github.com/ethauvin/akismet-kotlin/blob/master/examples/gradle/src/main/kotlin/com/example/AkismetServlet.kt) -### JSON +## JSON Since comments mis-identified as spam or ham can be submitted to Askimet to improve the service. A comment can be saved as a JSON object to be stored in a database, etc. @@ -104,5 +116,24 @@ At a latter time, the comment can then be submitted: akismet.submitSpam(Akismet.jsonComment(json)) ``` -### More... +## Contributing + +If you want to contribute to this project, all you have to do is clone the GitHub +repository: + +```console +git clone git@github.com:ethauvin/akismet-kotlin.git +``` + +Then use [bld](https://rife2.com/bld) to build: + +```console +cd akismet-kotlin +./bld compile +``` + +The project has an [IntelliJ IDEA](https://www.jetbrains.com/idea/) project structure. You can just open it after all the dependencies were downloaded and peruse the code. + +### More… + If all else fails, there's always more [Documentation](https://ethauvin.github.io/akismet-kotlin/). diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index a9514a0..ace99d2 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -1,9 +1,20 @@ -image: maven:3-openjdk-18 +image: ubuntu:latest pipelines: default: - step: - caches: - - gradle + name: Test with bld script: - - bash ./gradlew check + # Install latest Java & Kotlin via SDKMAN! + - apt-get update -qq && apt-get install -y curl zip + - curl -s "https://get.sdkman.io" | bash + - echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config + - echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config + - source "$HOME/.sdkman/bin/sdkman-init.sh" + - sdk install java + - sdk install kotlin + - source "$HOME/.sdkman/bin/sdkman-init.sh" + # Download, compile and test with bld + - ./bld download + - ./bld compile + - ./bld test diff --git a/bld b/bld new file mode 100755 index 0000000..f9906e9 --- /dev/null +++ b/bld @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +java -jar "$(dirname "$0")/lib/bld/bld-wrapper.jar" "$0" --build net.thauvin.erik.AkismetBuild "$@" \ No newline at end of file diff --git a/bld.bat b/bld.bat new file mode 100644 index 0000000..5a0f2a2 --- /dev/null +++ b/bld.bat @@ -0,0 +1,4 @@ +@echo off +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +java -jar "%DIRNAME%/lib/bld/bld-wrapper.jar" "%0" --build net.thauvin.erik.AkismetBuild %* \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts deleted file mode 100644 index 5bd9fb7..0000000 --- a/build.gradle.kts +++ /dev/null @@ -1,272 +0,0 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -import java.net.URL -import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask -import org.gradle.api.tasks.testing.logging.TestExceptionFormat -import org.gradle.api.tasks.testing.logging.TestLogEvent - -plugins { - id("com.github.ben-manes.versions") version "0.48.0" - id("io.gitlab.arturbosch.detekt") version "1.23.1" - id("java-library") - id("java") - id("maven-publish") - id("net.thauvin.erik.gradle.semver") version "1.0.4" - id("org.jetbrains.dokka") version "1.9.0" - id("org.jetbrains.kotlinx.kover") version "0.7.3" - id("org.sonarqube") version "4.3.1.3277" - id("signing") - kotlin("jvm") version "1.9.10" - kotlin("kapt") version "1.9.10" - kotlin("plugin.serialization") version "1.9.10" -} - -group = "net.thauvin.erik" -description = "A client library for accessing the Automattic Kismet (Akismet) spam comments filtering service." - -val gitHub = "ethauvin/$name" -val mavenUrl = "https://github.com/$gitHub" -val deployDir = "deploy" -var isRelease = "release" in gradle.startParameter.taskNames - -var semverProcessor = "net.thauvin.erik:semver:1.2.0" - -val publicationName = "mavenJava" - -object Versions { - const val OKHTTP = "4.11.0" -} - -fun isNonStable(version: String): Boolean { - val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) } - val regex = "^[0-9,.v-]+(-r)?$".toRegex() - val isStable = stableKeyword || regex.matches(version) - return isStable.not() -} - -repositories { - mavenCentral() - maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") } -} - -dependencies { - kapt(semverProcessor) - compileOnly(semverProcessor) - - implementation(platform("org.jetbrains.kotlin:kotlin-bom")) - -// implementation("javax.servlet:javax.servlet-api:4.0.1") - implementation("jakarta.servlet:jakarta.servlet-api:6.0.0") - - - implementation("com.squareup.okhttp3:okhttp:${Versions.OKHTTP}") - implementation("com.squareup.okio:okio:3.5.0") - implementation("com.squareup.okhttp3:logging-interceptor:${Versions.OKHTTP}") - - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0") - - testImplementation("org.mockito:mockito-core:5.5.0") - testImplementation("org.testng:testng:7.8.0") - testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.27.0") -} - -kapt { - arguments { - arg("semver.project.dir", projectDir) - } -} - -detekt { - //toolVersion = "main-SNAPSHOT" - baseline = project.rootDir.resolve("config/detekt/baseline.xml") -} - -java { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - withSourcesJar() -} - -koverReport { - defaults { - xml { - onCheck = true - } - html { - onCheck = true - } - } -} - -sonarqube { - properties { - property("sonar.projectKey", "ethauvin_$name") - property("sonar.organization", "ethauvin-github") - property("sonar.host.url", "https://sonarcloud.io") - property("sonar.sourceEncoding", "UTF-8") - property("sonar.coverage.jacoco.xmlReportPaths", "${layout.buildDirectory.get()}/reports/kover/report.xml") - } -} - -val javadocJar by tasks.creating(Jar::class) { - dependsOn(tasks.dokkaJavadoc) - from(tasks.dokkaJavadoc) - archiveClassifier.set("javadoc") - description = "Assembles a JAR of the generated Javadoc." - group = JavaBasePlugin.DOCUMENTATION_GROUP -} - -tasks { - withType { - testLogging { - exceptionFormat = TestExceptionFormat.FULL - events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED) - } - - useTestNG() - } - - withType().configureEach { - kotlinOptions.jvmTarget = java.targetCompatibility.toString() - } - - withType { - destination = file("$projectDir/pom.xml") - } - - withType { - rejectVersionIf { - isNonStable(candidate.version) - } - } - - assemble { - dependsOn(javadocJar) - } - - clean { - doLast { - project.delete(fileTree(deployDir)) - } - } - - dokkaHtml { - outputDirectory.set(file("$projectDir/docs")) - - dokkaSourceSets { - configureEach { - includes.from("config/dokka/packages.md") - sourceLink { - localDirectory.set(file("src/main/kotlin/")) - remoteUrl.set(URL("https://github.com/ethauvin/${project.name}/tree/master/src/main/kotlin/")) - remoteLineSuffix.set("#L") - } - externalDocumentationLink { - url.set(URL("https://jakarta.ee/specifications/platform/9/apidocs/")) - } - } - } - } - - dokkaJavadoc { - dependsOn("kaptKotlin") - dokkaSourceSets { - configureEach { - includes.from("config/dokka/packages.md") - externalDocumentationLink { - url.set(URL("https://jakarta.ee/specifications/platform/9/apidocs/")) - } - } - } - } - - val copyToDeploy by registering(Copy::class) { - from(configurations.runtimeClasspath) { - exclude("annotations-*.jar", "jakarta.servlet-*.jar") - } - from(jar) - into(deployDir) - } - - register("deploy") { - description = "Copies all needed files to the $deployDir directory." - group = PublishingPlugin.PUBLISH_TASK_GROUP - dependsOn(clean, build, jar) - outputs.dir(deployDir) - inputs.files(copyToDeploy) - mustRunAfter(clean) - } - - val gitIsDirty by registering(Exec::class) { - description = "Fails if git has uncommitted changes." - group = "verification" - commandLine("git", "diff", "--quiet", "--exit-code") - } - - val gitTag by registering(Exec::class) { - description = "Tags the local repository with version ${project.version}" - group = PublishingPlugin.PUBLISH_TASK_GROUP - dependsOn(gitIsDirty) - if (isRelease) { - commandLine("git", "tag", "-a", project.version, "-m", "Version ${project.version}") - } - } - - register("release") { - description = "Publishes version ${project.version} to local repository." - group = PublishingPlugin.PUBLISH_TASK_GROUP - dependsOn(dokkaHtml, "deploy", gitTag, publishToMavenLocal) - } -} - -publishing { - publications { - create(publicationName) { - from(components["java"]) - artifact(javadocJar) - pom { - name.set(project.name) - description.set(project.description) - url.set(mavenUrl) - licenses { - license { - name.set("BSD 3-Clause") - url.set("https://opensource.org/licenses/BSD-3-Clause") - } - } - developers { - developer { - id.set("ethauvin") - name.set("Erik C. Thauvin") - email.set("erik@thauvin.net") - url.set("https://erik.thauvin.net/") - } - } - scm { - connection.set("scm:git:https://github.com/$gitHub.git") - developerConnection.set("scm:git:git@github.com:$gitHub.git") - url.set(mavenUrl) - } - issueManagement { - system.set("GitHub") - url.set("$mavenUrl/issues") - } - } - } - } - repositories { - maven { - name = "ossrh" - project.afterEvaluate { - url = if (project.version.toString().contains("SNAPSHOT")) - uri("https://oss.sonatype.org/content/repositories/snapshots/") else - uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") - } - credentials(PasswordCredentials::class) - } - } -} - -signing { - useGpgCmd() - sign(publishing.publications[publicationName]) -} diff --git a/config/detekt/baseline.xml b/config/detekt/baseline.xml index c62f0b7..a418973 100644 --- a/config/detekt/baseline.xml +++ b/config/detekt/baseline.xml @@ -1,13 +1,17 @@ - + - + CyclomaticComplexMethod:Akismet.kt$Akismet$private fun buildFormBody(comment: AkismetComment): FormBody CyclomaticComplexMethod:AkismetComment.kt$AkismetComment$@Suppress("DuplicatedCode") override fun equals(other: Any?): Boolean + LongParameterList:AkismetServlet.kt$AkismetServlet$( id: String, name: String?, email: String?, date: String?, comment: String?, json: String, isSpam: Boolean ) MagicNumber:Akismet.kt$Akismet$12 MagicNumber:Akismet.kt$Akismet$8 NestedBlockDepth:Akismet.kt$Akismet$@JvmOverloads fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean + NestedBlockDepth:AkismetExample.kt$fun main(args: Array<String>) NestedBlockDepth:AkismetTest.kt$fun getKey(key: String): String ReturnCount:Akismet.kt$Akismet$@JvmOverloads fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean + TooManyFunctions:CommentConfig.kt$CommentConfig$Builder + WildcardImport:AkismetTest.kt$import assertk.assertions.* diff --git a/config/dokka/packages.md b/config/dokka/packages.md index 138c3a1..0183a6f 100644 --- a/config/dokka/packages.md +++ b/config/dokka/packages.md @@ -2,7 +2,7 @@ [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 +# Package net.thauvin.erik.akismet A Kotlin/Java library for accessing the Akismet service. diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html new file mode 100644 index 0000000..11d8349 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html @@ -0,0 +1,80 @@ + + + + + AkismetComment + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AkismetComment

+
+
constructor(request: HttpServletRequest)(source)

Creates a new instance extracting the userIp, userAgent, referrer and serverEnv environment variables from a Servlet request.

See the Akismet API for more details.

See also


constructor(config: CommentConfig)(source)


constructor(userIp: String, userAgent: String)(source)

Creates a new instance.

See the Akismet API for more details.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html similarity index 78% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html index 96f4914..fb1d46f 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

ADMIN_ROLE

-

Administrator role. If used, Akismet will always return false.

+

Administrator role. If used, Akismet will always return false.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html index af6f8d4..6c48b56 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

TYPE_BLOG_POST

-

A blog post.

+

A blog post.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html index f781e99..f4812cc 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

TYPE_COMMENT

-

A blog comment.

+

A blog comment.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html index e8138ef..8fae3a3 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

TYPE_CONTACT_FORM

-

A contact form or feedback form submission.

+

A contact form or feedback form submission.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html index c724381..410c349 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

TYPE_FORUM_POST

-

A top-level forum post.

+

A top-level forum post.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html index 1a5a27c..b495a44 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

TYPE_MESSAGE

-

A message sent between just a few users.

+

A message sent between just a few users.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html index 2ce8877..8da9d4c 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

TYPE_PINGBACK

-

A pingback.

+

A pingback.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html index 4f6e6b5..f2fec4a 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

TYPE_REPLY

-

A reply to a top-level forum post.

+

A reply to a top-level forum post.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html index 0c14ac6..c665a02 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

TYPE_SIGNUP

-

A new user account.

+

A new user account.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html index 2de0435..945d496 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

TYPE_TRACKBACK

-

A trackback.

+

A trackback.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html index d0a50f5..a042273 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

TYPE_TWEET

-

A Twitter message.

+

A Twitter message.

diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html new file mode 100644 index 0000000..7c4d295 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html @@ -0,0 +1,104 @@ + + + + + Companion + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Companion

+ +
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
const val ADMIN_ROLE: String

Administrator role. If used, Akismet will always return false.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html similarity index 78% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html index 1caea15..42fcc4e 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

authorEmail

-

Email address submitted with the comment.

+

Email address submitted with the comment.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html index cff3c30..3504120 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

authorUrl

-

URL submitted with comment.

+

URL submitted with comment.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html similarity index 78% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html index 8f099a2..ded74c2 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

author

-

Name submitted with the comment.

+

Name submitted with the comment.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html similarity index 77% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html index f5175d8..4041d4c 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

blogCharset

-

The character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1

+

The character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html similarity index 76% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html index e433214..0c95d14 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

blogLang

-

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

+

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/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html similarity index 78% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html index f3a7cc3..93ebd83 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

content

-

The content that was submitted.

+

The content that was submitted.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html similarity index 71% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html index 05c48ac..d6d0129 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

dateGmt

-

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

+

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

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html similarity index 73% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html index f2fc81a..5b07d23 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

equals

-
open operator override fun equals(other: Any?): Boolean(source)

Indicates whether some other object is equal to this one.

+
open operator override fun equals(other: Any?): Boolean(source)

Indicates whether some other object is equal to this one.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html similarity index 77% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html index d83fd96..0da7001 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

hashCode

-
open override fun hashCode(): Int(source)

Returns a hash code value for the object.

+
open override fun hashCode(): Int(source)

Returns a hash code value for the object.

diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html new file mode 100644 index 0000000..1b9d9dd --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html @@ -0,0 +1,446 @@ + + + + + AkismetComment + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AkismetComment

+
@Serializable
open class AkismetComment(val userIp: String, val userAgent: String)(source)

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 for more details.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(request: HttpServletRequest)

Creates a new instance extracting the userIp, userAgent, referrer and serverEnv environment variables from a Servlet request.

constructor(config: CommentConfig)
constructor(userIp: String, userAgent: String)

Creates a new instance.

+
+
+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
object Companion
+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

Name submitted with the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Email address submitted with the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

URL submitted with comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Indicates the language(s) in use on the blog or site, in ISO 639-1 format, comma-separated.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The content that was submitted.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The UTC timestamp of the creation of the comment, in ISO 8601 format.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

This is an optional parameter. You can use it when submitting test queries to Akismet.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The full permanent URL of the entry the comment was submitted to.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

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.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The content of the referer header should be set here.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

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.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A string that describes the type of content being sent, such as:

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The user role of the user who submitted the comment. This is an optional parameter.

+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
open operator override fun equals(other: Any?): Boolean

Indicates whether some other object is equal to this one.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
open override fun hashCode(): Int

Returns a hash code value for the object.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun toJson(): String

Returns a JSON representation of the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
open override fun toString(): String

Returns a JSON representation of the comment.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html similarity index 78% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html index d67c2e9..84ee583 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

isTest

-

This is an optional parameter. You can use it when submitting test queries to Akismet.

+

This is an optional parameter. You can use it when submitting test queries to Akismet.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html similarity index 78% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html index 35105e3..726e840 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

permalink

-

The full permanent URL of the entry the comment was submitted to.

+

The full permanent URL of the entry the comment was submitted to.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html similarity index 71% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html index 073da52..938165e 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

postModifiedGmt

-

The UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

See also

+

The UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

See also

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html similarity index 74% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html index bcc3a67..843ff0a 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

recheckReason

-

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

+

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/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html similarity index 78% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html index 681512f..1f98cd5 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

referrer

-

The content of the referer header should be set here.

+

The content of the referer header should be set here.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html similarity index 69% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html index 3854222..7a7315a 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

serverEnv

-

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.

+

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/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html similarity index 71% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html index e051484..87ffa29 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

toJson

-

Returns a JSON representation of the comment.

See also

+

Returns a JSON representation of the comment.

See also

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html similarity index 70% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html index 5c1d1ee..8f8bc1b 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

toString

-
open override fun toString(): String(source)

Returns a JSON representation of the comment.

See also

+
open override fun toString(): String(source)

Returns a JSON representation of the comment.

See also

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html similarity index 62% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html index 71b0f1a..3756d68 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

type

-

A string that describes the type of content being sent, such as:

You may send a value not listed above if none of them accurately describe your content.

This is further explained here.

+

A string that describes the type of content being sent, such as:

You may send a value not listed above if none of them accurately describe your content.

This is further explained here.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html similarity index 73% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html index 8e54c2b..53f9d4d 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

userAgent

-

Parameters

userAgent

User agent string of the web browser submitting the comment.

+

Parameters

userAgent

User agent string of the web browser submitting the comment.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html similarity index 74% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html index 44162b6..45255c9 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

userIp

-

Parameters

userIp

IP address of the comment submitter.

+

Parameters

userIp

IP address of the comment submitter.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html similarity index 76% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html index ad45d09..0859ea8 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

userRole

-

The user role of the user who submitted the comment. This is an optional parameter.

If you set it to ADMIN_ROLE, Akismet will always return false.

+

The user role of the user who submitted the comment. This is an optional parameter.

If you set it to ADMIN_ROLE, Akismet will always return false.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html similarity index 65% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html index f163be4..7ce8321 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

Akismet

-
constructor(apiKey: String, blog: String)(source)

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


constructor(apiKey: String)(source)

Creates a new instance using the provided Akismet API key.

+
constructor(apiKey: String, blog: String)(source)

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


constructor(apiKey: String)(source)

Creates a new instance using the provided Akismet API key.

diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html new file mode 100644 index 0000000..0924417 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html @@ -0,0 +1,80 @@ + + + + + dateToGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dateToGmt

+
+

Converts a date to a UTC timestamp. (ISO 8601)

See also


Converts a locale date/time to a UTC timestamp. (ISO 8601)

See also

+
+ +
+
+
+ + diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html similarity index 60% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html index f1e0a37..d877405 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

Companion

- +

Functions

-
-
+
+
- +
Link copied to clipboard
-

Converts a locale date/time to a UTC timestamp. (ISO 8601)

Converts a date to a UTC timestamp. (ISO 8601)

+

Converts a locale date/time to a UTC timestamp. (ISO 8601)

Converts a date to a UTC timestamp. (ISO 8601)

- -
+ +
- +
Link copied to clipboard
-

(Re)Creates a comment from a JSON string.

+

(Re)Creates a comment from a JSON string.

@@ -108,7 +108,7 @@
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html similarity index 66% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html index a01d046..ed8f7c5 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

jsonComment

-

(Re)Creates a comment from a JSON string.

See also

+

(Re)Creates a comment from a JSON string.

See also

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html similarity index 70% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html index 31ab4a6..84ee7ab 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

appUserAgent

-

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 for more details.

+

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 for more details.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/blog.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/blog.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/blog.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/blog.html index f5c00e0..99d2d9f 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/blog.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/blog.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

blog

-

The URL registered with Akismet.

+

The URL registered with Akismet.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html similarity index 55% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html index 83d5d2a..aba5c2e 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

checkComment

-
fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean(source)

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 for more details.

Return

true if the comment is spam, false if the comment is not.

Parameters

trueOnError

Set to return true on error.

+
fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean(source)

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 for more details.

Return

true if the comment is spam, false if the comment is not.

Parameters

trueOnError

Set to return true on error.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html similarity index 70% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html index 5694719..164d211 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

debugHelp

-

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 for more details.

+

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 for more details.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/error-message.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/error-message.html similarity index 72% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/error-message.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/error-message.html index 7ed18c3..51fd206 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/error-message.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/error-message.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

errorMessage

-

The error message.

The error (IO, empty response from Akismet, etc.) message is also logged as a warning.

See also

+

The error message.

The error (IO, empty response from Akismet, etc.) message is also logged as a warning.

See also

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html similarity index 54% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html index 7982c47..dc6eb87 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

executeMethod

-
fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean(source)

Executes 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.)

+
fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean(source)

Executes 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.)

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html similarity index 78% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html index 05b62b3..c814e4f 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

httpStatusCode

-

The HTTP status code of the last operation.

+

The HTTP status code of the last operation.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/index.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/index.html similarity index 50% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/index.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/index.html index 9339846..91c5041 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/index.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/index.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

Akismet

-
open class Akismet(apiKey: String)(source)

Provides access to the Akismet API.

+
open class Akismet(apiKey: String)(source)

Provides access to the Akismet API.

Constructors

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

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

constructor(apiKey: String)

Creates a new instance using the provided Akismet API key.

+
constructor(apiKey: String, blog: String)

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

constructor(apiKey: String)

Creates a new instance using the provided Akismet API key.

@@ -91,17 +91,17 @@

Types

-
-
+
+
- +
Link copied to clipboard
-
object Companion
+
object Companion
@@ -110,152 +110,152 @@

Properties

-
-
+
+
- +
Link copied to clipboard
-

The application user agent to be sent to Akismet.

+

The application user agent to be sent to Akismet.

- -
+ +
- +
Link copied to clipboard
-

The URL registered with Akismet.

+

The URL registered with Akismet.

- -
+ +
- +
Link copied to clipboard
-

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

+

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

- -
+ +
- +
Link copied to clipboard
-

The error message.

+

The error message.

- -
+ +
- +
Link copied to clipboard
-

The HTTP status code of the last operation.

+

The HTTP status code of the last operation.

- -
+ +
- +
Link copied to clipboard
-

Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.

+

Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.

- -
+ +
- +
Link copied to clipboard
-

Set to true if the API Key has been verified.

+

Set to true if the API Key has been verified.

- -
+ +
- +
Link copied to clipboard
-

The logger instance.

+

The logger instance.

- -
+ +
- +
Link copied to clipboard
-

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

+

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

- -
+ +
- +
Link copied to clipboard
-

The actual response sent by Akismet from the last operation.

+

The actual response sent by Akismet from the last operation.

@@ -264,92 +264,92 @@

Functions

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

Comment Check.

+
fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean

Comment Check.

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

Executes a call to an Akismet REST API method.

+
fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean

Executes a call to an Akismet REST API method.

- -
+ +
- +
Link copied to clipboard
- -
+ +
- +
Link copied to clipboard
-

Submit Ham. (False Positives)

+

Submit Ham. (False Positives)

- -
+ +
- +
Link copied to clipboard
-

Submit Spam. (Missed Spam)

+

Submit Spam. (Missed Spam)

- -
+ +
- +
Link copied to clipboard
-

Key Verification.

+

Key Verification.

@@ -360,7 +360,7 @@
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html similarity index 70% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html index 54ea4e6..79df4f8 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

isDiscard

-

Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.

See the Akismet API for more details.

See also

+

Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.

See the Akismet API for more details.

See also

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html similarity index 73% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html index 2131200..5bca9eb 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

isVerifiedKey

-

Set to true if the API Key has been verified.

See also

+

Set to true if the API Key has been verified.

See also

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/logger.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/logger.html similarity index 79% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/logger.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/logger.html index 8634ba4..fe5dea7 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/logger.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/logger.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

logger

-

The logger instance.

+

The logger instance.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html similarity index 68% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html index ccf4ae0..3e51d23 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

proTip

-

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 for more details.

See also

+

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 for more details.

See also

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/reset.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/reset.html similarity index 75% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/reset.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/reset.html index 6286ce7..50d9d77 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/reset.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/reset.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

reset

- +
diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/response.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/response.html similarity index 76% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/response.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/response.html index e47d54d..decd352 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/response.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/response.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

response

-

The actual response sent by Akismet from the last operation.

For example: true, false, valid, invalid, etc.

+

The actual response sent by Akismet from the last operation.

For example: true, false, valid, invalid, etc.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html similarity index 62% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html index abc2462..ffe5ab1 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

submitHam

-

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 and submit spam.

It is very important that the values you submit with this call match those of your comment check 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 for more details.

Return

true if the comment was submitted, false otherwise.

+

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 and submit spam.

It is very important that the values you submit with this call match those of your comment check 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 for more details.

Return

true if the comment was submitted, false otherwise.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html similarity index 63% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html index a2bdedc..9594d52 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

submitSpam

-

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 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 for more details.

Return

true if the comment was submitted, false otherwise.

+

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 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 for more details.

Return

true if the comment was submitted, false otherwise.

diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html similarity index 63% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html rename to docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html index 5a1fd44..759cacd 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
- +
+

verifyKey

-

Key Verification.

Key verification authenticates your key before calling the comment check, submit spam, or submit ham 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 for more details.

Return

true if the key is valid, false otherwise.

See also

+

Key Verification.

Key verification authenticates your key before calling the comment check, submit spam, or submit ham 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 for more details.

Return

true if the key is valid, false otherwise.

See also

diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/-builder.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/-builder.html new file mode 100644 index 0000000..42409f0 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/-builder.html @@ -0,0 +1,80 @@ + + + + + Builder + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Builder

+
+
constructor(userIp: String, userAgent: String)(source)

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html new file mode 100644 index 0000000..b0a3249 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html @@ -0,0 +1,80 @@ + + + + + authorEmail + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

authorEmail

+
+

Sets the email address submitted with the comment.


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html new file mode 100644 index 0000000..4fc1885 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html @@ -0,0 +1,80 @@ + + + + + authorUrl + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

authorUrl

+
+

Sets the URL submitted with comment.


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author.html new file mode 100644 index 0000000..b5d6c1f --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author.html @@ -0,0 +1,80 @@ + + + + + author + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

author

+
+

Sets the mame submitted with the comment.


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html new file mode 100644 index 0000000..79bb7b3 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html @@ -0,0 +1,80 @@ + + + + + blogCharset + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blogCharset

+
+

Sets the character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html new file mode 100644 index 0000000..efba3c8 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html @@ -0,0 +1,80 @@ + + + + + blogLang + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blogLang

+
+

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/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/build.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/build.html new file mode 100644 index 0000000..2caccd8 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/build.html @@ -0,0 +1,80 @@ + + + + + build + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

build

+
+

Builds a new comment configuration.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/content.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/content.html new file mode 100644 index 0000000..5a1ca4b --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/content.html @@ -0,0 +1,80 @@ + + + + + content + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

content

+
+

Sets the content that was submitted.


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html new file mode 100644 index 0000000..5bac02b --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html @@ -0,0 +1,80 @@ + + + + + dateGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dateGmt

+
+

Sets 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


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/index.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/index.html new file mode 100644 index 0000000..0657f64 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/index.html @@ -0,0 +1,637 @@ + + + + + Builder + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Builder

+
data class Builder(var userIp: String, var userAgent: String)(source)

Provides a configuration builder.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(userIp: String, userAgent: String)
+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the mame submitted with the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the email address submitted with the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the URL submitted with comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Indicates the language(s) in use on the blog or site, in ISO 639-1 format, comma-separated.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Builds a new comment configuration.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the content that was submitted.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the UTC timestamp of the creation of the comment, in ISO 8601 format.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

This is optional. You can set it when submitting test queries to Akismet.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the full permanent URL of the entry the comment was submitted to.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

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.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the content of the referrer header.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

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.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets a string that describes the type of content being sent, such as:

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the user agent string of the web browser submitting the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the IP address of the comment submitter.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Set the user role of the user who submitted the comment. This is an optional parameter.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html new file mode 100644 index 0000000..8d5b03c --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html @@ -0,0 +1,80 @@ + + + + + isTest + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isTest

+
+

This is optional. You can set it when submitting test queries to Akismet.


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html new file mode 100644 index 0000000..03b6af0 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html @@ -0,0 +1,80 @@ + + + + + permalink + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

permalink

+
+

Sets the full permanent URL of the entry the comment was submitted to.


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html new file mode 100644 index 0000000..d3e7f69 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html @@ -0,0 +1,80 @@ + + + + + postModifiedGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

postModifiedGmt

+
+

Sets the UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

See also


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html new file mode 100644 index 0000000..e63aeb0 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html @@ -0,0 +1,80 @@ + + + + + recheckReason + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

recheckReason

+
+

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/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html new file mode 100644 index 0000000..120085b --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html @@ -0,0 +1,80 @@ + + + + + referrer + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

referrer

+
+

Sets the content of the referrer header.


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html new file mode 100644 index 0000000..e6ec6d7 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html @@ -0,0 +1,80 @@ + + + + + serverEnv + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

serverEnv

+
+

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/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/type.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/type.html new file mode 100644 index 0000000..e0bc2f7 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/type.html @@ -0,0 +1,80 @@ + + + + + type + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

type

+
+

Sets a string that describes the type of content being sent, such as:

You may send a value not listed above if none of them accurately describe your content.

This is further explained here.


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html new file mode 100644 index 0000000..4bdc28f --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html @@ -0,0 +1,80 @@ + + + + + userAgent + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userAgent

+
+

Sets the user agent string of the web browser submitting the comment.


Parameters

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html new file mode 100644 index 0000000..8a35616 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html @@ -0,0 +1,80 @@ + + + + + userIp + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userIp

+
+

Sets the IP address of the comment submitter.


Parameters

userIp

IP address of the comment submitter.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html new file mode 100644 index 0000000..8e1095a --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html @@ -0,0 +1,80 @@ + + + + + userRole + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userRole

+
+

Set the user role of the user who submitted the comment. This is an optional parameter.

If you set it to ADMIN_ROLE, Akismet will always return false.


+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-comment-config.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-comment-config.html new file mode 100644 index 0000000..92cb19d --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-comment-config.html @@ -0,0 +1,80 @@ + + + + + CommentConfig + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

CommentConfig

+
+
constructor(builder: CommentConfig.Builder)(source)


constructor(userIp: String, userAgent: String, referrer: String = "", permalink: String = "", type: CommentType = CommentType.NONE, author: String = "", authorEmail: String = "", authorUrl: String = "", content: String = "", dateGmt: String = "", postModifiedGmt: String = "", blogLang: String = "", blogCharset: String = "", userRole: String = "", isTest: Boolean = false, recheckReason: String = "", serverEnv: Map<String, String> = emptyMap())(source)

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author-email.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author-email.html new file mode 100644 index 0000000..0f84c08 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author-email.html @@ -0,0 +1,80 @@ + + + + + authorEmail + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

authorEmail

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author-url.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author-url.html new file mode 100644 index 0000000..333ee15 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author-url.html @@ -0,0 +1,80 @@ + + + + + authorUrl + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

authorUrl

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author.html new file mode 100644 index 0000000..953e1ec --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author.html @@ -0,0 +1,80 @@ + + + + + author + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

author

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/blog-charset.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/blog-charset.html new file mode 100644 index 0000000..08be284 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/blog-charset.html @@ -0,0 +1,80 @@ + + + + + blogCharset + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blogCharset

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/blog-lang.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/blog-lang.html new file mode 100644 index 0000000..2eb0196 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/blog-lang.html @@ -0,0 +1,80 @@ + + + + + blogLang + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blogLang

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/content.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/content.html new file mode 100644 index 0000000..607cff5 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/content.html @@ -0,0 +1,80 @@ + + + + + content + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

content

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/date-gmt.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/date-gmt.html new file mode 100644 index 0000000..3ae7ad7 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/date-gmt.html @@ -0,0 +1,80 @@ + + + + + dateGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dateGmt

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/index.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/index.html new file mode 100644 index 0000000..2f6d1be --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/index.html @@ -0,0 +1,382 @@ + + + + + CommentConfig + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

CommentConfig

+
class CommentConfig @JvmOverloads constructor(var userIp: String, var userAgent: String, var referrer: String = "", var permalink: String = "", var type: CommentType = CommentType.NONE, var author: String = "", var authorEmail: String = "", var authorUrl: String = "", var content: String = "", var dateGmt: String = "", var postModifiedGmt: String = "", var blogLang: String = "", var blogCharset: String = "", var userRole: String = "", var isTest: Boolean = false, var recheckReason: String = "", var serverEnv: Map<String, String> = emptyMap())(source)

Provides a comment configuration.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(builder: CommentConfig.Builder)
constructor(userIp: String, userAgent: String, referrer: String = "", permalink: String = "", type: CommentType = CommentType.NONE, author: String = "", authorEmail: String = "", authorUrl: String = "", content: String = "", dateGmt: String = "", postModifiedGmt: String = "", blogLang: String = "", blogCharset: String = "", userRole: String = "", isTest: Boolean = false, recheckReason: String = "", serverEnv: Map<String, String> = emptyMap())
+
+
+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
data class Builder(var userIp: String, var userAgent: String)

Provides a configuration builder.

+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/is-test.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/is-test.html new file mode 100644 index 0000000..38be6ab --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/is-test.html @@ -0,0 +1,80 @@ + + + + + isTest + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isTest

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/permalink.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/permalink.html new file mode 100644 index 0000000..a4d80d1 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/permalink.html @@ -0,0 +1,80 @@ + + + + + permalink + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

permalink

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/post-modified-gmt.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/post-modified-gmt.html new file mode 100644 index 0000000..d6ea740 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/post-modified-gmt.html @@ -0,0 +1,80 @@ + + + + + postModifiedGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

postModifiedGmt

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/recheck-reason.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/recheck-reason.html new file mode 100644 index 0000000..637a275 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/recheck-reason.html @@ -0,0 +1,80 @@ + + + + + recheckReason + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

recheckReason

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/referrer.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/referrer.html new file mode 100644 index 0000000..21c0d83 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/referrer.html @@ -0,0 +1,80 @@ + + + + + referrer + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

referrer

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/server-env.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/server-env.html new file mode 100644 index 0000000..8956bbb --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/server-env.html @@ -0,0 +1,80 @@ + + + + + serverEnv + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

serverEnv

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/type.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/type.html new file mode 100644 index 0000000..6e58405 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/type.html @@ -0,0 +1,80 @@ + + + + + type + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

type

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-agent.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-agent.html new file mode 100644 index 0000000..d7f041a --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-agent.html @@ -0,0 +1,80 @@ + + + + + userAgent + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userAgent

+
+

Parameters

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-ip.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-ip.html new file mode 100644 index 0000000..175e7ff --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-ip.html @@ -0,0 +1,80 @@ + + + + + userIp + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userIp

+
+

Parameters

userIp

IP address of the comment submitter.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-role.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-role.html new file mode 100644 index 0000000..32f14b6 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-role.html @@ -0,0 +1,80 @@ + + + + + userRole + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userRole

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-comment-type.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-comment-type.html new file mode 100644 index 0000000..b86739b --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-comment-type.html @@ -0,0 +1,80 @@ + + + + + CommentType + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

CommentType

+
+
constructor(value: String)(source)
+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-b-l-o-g_-p-o-s-t.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-b-l-o-g_-p-o-s-t.html new file mode 100644 index 0000000..4a5d2f0 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-b-l-o-g_-p-o-s-t.html @@ -0,0 +1,80 @@ + + + + + BLOG_POST + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

BLOG_POST

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-m-m-e-n-t.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-m-m-e-n-t.html new file mode 100644 index 0000000..cb2eb0d --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-m-m-e-n-t.html @@ -0,0 +1,80 @@ + + + + + COMMENT + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

COMMENT

+
+

A blog comment.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-n-t-a-c-t_-f-o-r-m.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-n-t-a-c-t_-f-o-r-m.html new file mode 100644 index 0000000..26881e1 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-n-t-a-c-t_-f-o-r-m.html @@ -0,0 +1,80 @@ + + + + + CONTACT_FORM + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

CONTACT_FORM

+
+

A contact form or feedback form submission.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-f-o-r-u-m_-p-o-s-t.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-f-o-r-u-m_-p-o-s-t.html new file mode 100644 index 0000000..fb57de8 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-f-o-r-u-m_-p-o-s-t.html @@ -0,0 +1,80 @@ + + + + + FORUM_POST + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

FORUM_POST

+
+

A top-level forum post.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-m-e-s-s-a-g-e.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-m-e-s-s-a-g-e.html new file mode 100644 index 0000000..8865a1c --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-m-e-s-s-a-g-e.html @@ -0,0 +1,80 @@ + + + + + MESSAGE + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

MESSAGE

+
+

A message sent between just a few users.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-n-o-n-e.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-n-o-n-e.html new file mode 100644 index 0000000..b38dedd --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-n-o-n-e.html @@ -0,0 +1,80 @@ + + + + + NONE + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

NONE

+
+

Undefined type.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-p-i-n-g-b-a-c-k.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-p-i-n-g-b-a-c-k.html new file mode 100644 index 0000000..acd5dba --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-p-i-n-g-b-a-c-k.html @@ -0,0 +1,80 @@ + + + + + PINGBACK + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

PINGBACK

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-r-e-p-l-y.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-r-e-p-l-y.html new file mode 100644 index 0000000..e922c1e --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-r-e-p-l-y.html @@ -0,0 +1,80 @@ + + + + + REPLY + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

REPLY

+
+

A reply to a top-level forum post.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-s-i-g-n-u-p.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-s-i-g-n-u-p.html new file mode 100644 index 0000000..582c4e7 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-s-i-g-n-u-p.html @@ -0,0 +1,80 @@ + + + + + SIGNUP + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

SIGNUP

+
+

A new user account.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-t-r-a-c-k-b-a-c-k.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-t-r-a-c-k-b-a-c-k.html new file mode 100644 index 0000000..fb98b3d --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-t-r-a-c-k-b-a-c-k.html @@ -0,0 +1,80 @@ + + + + + TRACKBACK + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

TRACKBACK

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-t-w-e-e-t.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-t-w-e-e-t.html new file mode 100644 index 0000000..7388be1 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-t-w-e-e-t.html @@ -0,0 +1,80 @@ + + + + + TWEET + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

TWEET

+
+

A Twitter message.

+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/index.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/index.html new file mode 100644 index 0000000..7a08dfa --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/index.html @@ -0,0 +1,254 @@ + + + + + Companion + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Companion

+ +
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

A blog post.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A blog comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A contact form or feedback form submission.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A top-level forum post.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A message sent between just a few users.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Undefined type.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A pingback.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A reply to a top-level forum post.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A new user account.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A trackback.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A Twitter message.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/index.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/index.html new file mode 100644 index 0000000..40c11a5 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/index.html @@ -0,0 +1,142 @@ + + + + + CommentType + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

CommentType

+
@Serializable
data class CommentType(var value: String)(source)

Defines the comment types.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(value: String)
+
+
+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
object Companion
+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/value.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/value.html new file mode 100644 index 0000000..ea7ae3d --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/value.html @@ -0,0 +1,80 @@ + + + + + value + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

value

+
+ +
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/net.thauvin.erik.akismet/index.html b/docs/-akismet -kotlin/net.thauvin.erik.akismet/index.html new file mode 100644 index 0000000..d28b509 --- /dev/null +++ b/docs/-akismet -kotlin/net.thauvin.erik.akismet/index.html @@ -0,0 +1,149 @@ + + + + + net.thauvin.erik.akismet + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Package-level declarations

+

A Kotlin/Java library for accessing the Akismet service.

+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
open class Akismet(apiKey: String)

Provides access to the Akismet API.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
@Serializable
open class AkismetComment(val userIp: String, val userAgent: String)

A comment to send to Akismet.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
class CommentConfig @JvmOverloads constructor(var userIp: String, var userAgent: String, var referrer: String = "", var permalink: String = "", var type: CommentType = CommentType.NONE, var author: String = "", var authorEmail: String = "", var authorUrl: String = "", var content: String = "", var dateGmt: String = "", var postModifiedGmt: String = "", var blogLang: String = "", var blogCharset: String = "", var userRole: String = "", var isTest: Boolean = false, var recheckReason: String = "", var serverEnv: Map<String, String> = emptyMap())

Provides a comment configuration.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
@Serializable
data class CommentType(var value: String)

Defines the comment types.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/-akismet -kotlin/package-list b/docs/-akismet -kotlin/package-list new file mode 100644 index 0000000..5372bf1 --- /dev/null +++ b/docs/-akismet -kotlin/package-list @@ -0,0 +1,127 @@ +$dokka.format:html-v1 +$dokka.linkExtension:html +$dokka.location:net.thauvin.erik.akismet////PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/index.html +$dokka.location:net.thauvin.erik.akismet/Akismet.Companion///PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html +$dokka.location:net.thauvin.erik.akismet/Akismet.Companion/dateToGmt/#java.time.LocalDateTime/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html +$dokka.location:net.thauvin.erik.akismet/Akismet.Companion/dateToGmt/#java.util.Date/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html +$dokka.location:net.thauvin.erik.akismet/Akismet.Companion/jsonComment/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html +$dokka.location:net.thauvin.erik.akismet/Akismet///PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/index.html +$dokka.location:net.thauvin.erik.akismet/Akismet/Akismet/#kotlin.String#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html +$dokka.location:net.thauvin.erik.akismet/Akismet/Akismet/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html +$dokka.location:net.thauvin.erik.akismet/Akismet/appUserAgent/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html +$dokka.location:net.thauvin.erik.akismet/Akismet/blog/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/blog.html +$dokka.location:net.thauvin.erik.akismet/Akismet/checkComment/#net.thauvin.erik.akismet.AkismetComment#kotlin.Boolean/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html +$dokka.location:net.thauvin.erik.akismet/Akismet/debugHelp/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html +$dokka.location:net.thauvin.erik.akismet/Akismet/errorMessage/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/error-message.html +$dokka.location:net.thauvin.erik.akismet/Akismet/executeMethod/#okhttp3.HttpUrl#okhttp3.FormBody#kotlin.Boolean/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html +$dokka.location:net.thauvin.erik.akismet/Akismet/httpStatusCode/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html +$dokka.location:net.thauvin.erik.akismet/Akismet/isDiscard/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html +$dokka.location:net.thauvin.erik.akismet/Akismet/isVerifiedKey/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html +$dokka.location:net.thauvin.erik.akismet/Akismet/logger/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/logger.html +$dokka.location:net.thauvin.erik.akismet/Akismet/proTip/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html +$dokka.location:net.thauvin.erik.akismet/Akismet/reset/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/reset.html +$dokka.location:net.thauvin.erik.akismet/Akismet/response/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/response.html +$dokka.location:net.thauvin.erik.akismet/Akismet/submitHam/#net.thauvin.erik.akismet.AkismetComment/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html +$dokka.location:net.thauvin.erik.akismet/Akismet/submitSpam/#net.thauvin.erik.akismet.AkismetComment/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html +$dokka.location:net.thauvin.erik.akismet/Akismet/verifyKey/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion///PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/ADMIN_ROLE/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment///PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/AkismetComment/#jakarta.servlet.http.HttpServletRequest/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/AkismetComment/#kotlin.String#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/AkismetComment/#net.thauvin.erik.akismet.CommentConfig/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/author/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/authorEmail/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/authorUrl/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/blogCharset/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/blogLang/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/content/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/dateGmt/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/equals/#kotlin.Any?/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/hashCode/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/isTest/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/permalink/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/postModifiedGmt/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/recheckReason/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/referrer/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/serverEnv/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/toJson/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/toString/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/type/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/userAgent/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/userIp/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/userRole/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder///PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/index.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/Builder/#kotlin.String#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/-builder.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/author/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/author/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/authorEmail/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/authorEmail/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/authorUrl/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/authorUrl/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/blogCharset/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/blogCharset/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/blogLang/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/blogLang/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/build/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/build.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/content/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/content.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/content/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/content.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/dateGmt/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/dateGmt/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/isTest/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/isTest/#kotlin.Boolean/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/permalink/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/permalink/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/postModifiedGmt/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/postModifiedGmt/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/recheckReason/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/recheckReason/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/referrer/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/referrer/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/serverEnv/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/serverEnv/#kotlin.collections.Map[kotlin.String,kotlin.String]/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/type/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/type.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/type/#net.thauvin.erik.akismet.CommentType/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/type.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userAgent/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userAgent/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userIp/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userIp/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userRole/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userRole/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig///PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/index.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/CommentConfig/#kotlin.String#kotlin.String#kotlin.String#kotlin.String#net.thauvin.erik.akismet.CommentType#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.Boolean#kotlin.String#kotlin.collections.Map[kotlin.String,kotlin.String]/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-comment-config.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/CommentConfig/#net.thauvin.erik.akismet.CommentConfig.Builder/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-comment-config.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/author/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/authorEmail/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author-email.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/authorUrl/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author-url.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/blogCharset/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/blog-charset.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/blogLang/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/blog-lang.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/content/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/content.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/dateGmt/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/date-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/isTest/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/is-test.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/permalink/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/permalink.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/postModifiedGmt/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/post-modified-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/recheckReason/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/recheck-reason.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/referrer/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/referrer.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/serverEnv/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/server-env.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/type/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/type.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/userAgent/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-agent.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/userIp/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-ip.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/userRole/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-role.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion///PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/index.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/BLOG_POST/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-b-l-o-g_-p-o-s-t.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/COMMENT/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-m-m-e-n-t.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/CONTACT_FORM/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-n-t-a-c-t_-f-o-r-m.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/FORUM_POST/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-f-o-r-u-m_-p-o-s-t.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/MESSAGE/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-m-e-s-s-a-g-e.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/NONE/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-n-o-n-e.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/PINGBACK/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-p-i-n-g-b-a-c-k.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/REPLY/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-r-e-p-l-y.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/SIGNUP/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-s-i-g-n-u-p.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/TRACKBACK/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-t-r-a-c-k-b-a-c-k.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/TWEET/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-t-w-e-e-t.html +$dokka.location:net.thauvin.erik.akismet/CommentType///PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/index.html +$dokka.location:net.thauvin.erik.akismet/CommentType/CommentType/#kotlin.String/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-comment-type.html +$dokka.location:net.thauvin.erik.akismet/CommentType/value/#/PointingToDeclaration/-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/value.html +net.thauvin.erik.akismet + diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html deleted file mode 100644 index af49898..0000000 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - AkismetComment - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
-

AkismetComment

-
-
constructor(request: HttpServletRequest)(source)

Creates a new instance extracting the userIp, userAgent, referrer and serverEnv environment variables from a Servlet request.

See the Akismet API for more details.

See also


constructor(userIp: String, userAgent: String)(source)

Creates a new instance.

See the Akismet API for more details.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

-
- -
-
-
- - diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html deleted file mode 100644 index 463759b..0000000 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - - AkismetComment - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
-

AkismetComment

-
@Serializable
open class AkismetComment(val userIp: String, val userAgent: String)(source)

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 for more details.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

-
-
-
-
-
-

Constructors

-
-
-
-
- - -
Link copied to clipboard
-
-
-
-
constructor(request: HttpServletRequest)

Creates a new instance extracting the userIp, userAgent, referrer and serverEnv environment variables from a Servlet request.

constructor(userIp: String, userAgent: String)

Creates a new instance.

-
-
-
-
-
-
-
-

Types

-
-
-
-
- - -
Link copied to clipboard
-
-
-
-
object Companion
-
-
-
-
-
-
-
-

Properties

-
-
-
-
- - -
Link copied to clipboard
-
-
-
-

Name submitted with the comment.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

Email address submitted with the comment.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

URL submitted with comment.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

The character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

Indicates the language(s) in use on the blog or site, in ISO 639-1 format, comma-separated.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

The content that was submitted.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

The UTC timestamp of the creation of the comment, in ISO 8601 format.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

This is an optional parameter. You can use it when submitting test queries to Akismet.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

The full permanent URL of the entry the comment was submitted to.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

The UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

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.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

The content of the referer header should be set here.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

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.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-
var type: String?

A string that describes the type of content being sent, such as:

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
- -
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
- -
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-

The user role of the user who submitted the comment. This is an optional parameter.

-
-
-
-
-
-
-
-

Functions

-
-
-
-
- - -
Link copied to clipboard
-
-
-
-
open operator override fun equals(other: Any?): Boolean

Indicates whether some other object is equal to this one.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-
open override fun hashCode(): Int

Returns a hash code value for the object.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-
fun toJson(): String

Returns a JSON representation of the comment.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-
open override fun toString(): String

Returns a JSON representation of the comment.

-
-
-
-
-
-
-
-
-
- -
-
-
- - diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html deleted file mode 100644 index e3208f8..0000000 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - dateToGmt - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
-

dateToGmt

-
-

Converts a date to a UTC timestamp. (ISO 8601)

See also


Converts a locale date/time to a UTC timestamp. (ISO 8601)

See also

-
- -
-
-
- - diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/index.html b/docs/akismet-kotlin/net.thauvin.erik.akismet/index.html deleted file mode 100644 index ba39b9e..0000000 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - net.thauvin.erik.akismet - - - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
-

Package-level declarations

-
-
-
-
-
-

Types

-
-
-
-
- - -
Link copied to clipboard
-
-
-
-
open class Akismet(apiKey: String)

Provides access to the Akismet API.

-
-
-
-
- -
-
-
- - -
Link copied to clipboard
-
-
-
-
@Serializable
open class AkismetComment(val userIp: String, val userAgent: String)

A comment to send to Akismet.

-
-
-
-
-
-
-
-
-
- -
-
-
- - diff --git a/docs/akismet-kotlin/package-list b/docs/akismet-kotlin/package-list deleted file mode 100644 index 8f4b479..0000000 --- a/docs/akismet-kotlin/package-list +++ /dev/null @@ -1,64 +0,0 @@ -$dokka.format:html-v1 -$dokka.linkExtension:html -$dokka.location:net.thauvin.erik.akismet////PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/index.html -$dokka.location:net.thauvin.erik.akismet/Akismet.Companion///PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html -$dokka.location:net.thauvin.erik.akismet/Akismet.Companion/dateToGmt/#java.time.LocalDateTime/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html -$dokka.location:net.thauvin.erik.akismet/Akismet.Companion/dateToGmt/#java.util.Date/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html -$dokka.location:net.thauvin.erik.akismet/Akismet.Companion/jsonComment/#kotlin.String/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html -$dokka.location:net.thauvin.erik.akismet/Akismet///PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/index.html -$dokka.location:net.thauvin.erik.akismet/Akismet/Akismet/#kotlin.String#kotlin.String/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html -$dokka.location:net.thauvin.erik.akismet/Akismet/Akismet/#kotlin.String/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html -$dokka.location:net.thauvin.erik.akismet/Akismet/appUserAgent/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html -$dokka.location:net.thauvin.erik.akismet/Akismet/blog/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/blog.html -$dokka.location:net.thauvin.erik.akismet/Akismet/checkComment/#net.thauvin.erik.akismet.AkismetComment#kotlin.Boolean/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html -$dokka.location:net.thauvin.erik.akismet/Akismet/debugHelp/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html -$dokka.location:net.thauvin.erik.akismet/Akismet/errorMessage/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/error-message.html -$dokka.location:net.thauvin.erik.akismet/Akismet/executeMethod/#okhttp3.HttpUrl#okhttp3.FormBody#kotlin.Boolean/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html -$dokka.location:net.thauvin.erik.akismet/Akismet/httpStatusCode/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html -$dokka.location:net.thauvin.erik.akismet/Akismet/isDiscard/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html -$dokka.location:net.thauvin.erik.akismet/Akismet/isVerifiedKey/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html -$dokka.location:net.thauvin.erik.akismet/Akismet/logger/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/logger.html -$dokka.location:net.thauvin.erik.akismet/Akismet/proTip/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html -$dokka.location:net.thauvin.erik.akismet/Akismet/reset/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/reset.html -$dokka.location:net.thauvin.erik.akismet/Akismet/response/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/response.html -$dokka.location:net.thauvin.erik.akismet/Akismet/submitHam/#net.thauvin.erik.akismet.AkismetComment/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html -$dokka.location:net.thauvin.erik.akismet/Akismet/submitSpam/#net.thauvin.erik.akismet.AkismetComment/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html -$dokka.location:net.thauvin.erik.akismet/Akismet/verifyKey/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion///PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/ADMIN_ROLE/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/TYPE_BLOG_POST/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/TYPE_COMMENT/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/TYPE_CONTACT_FORM/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/TYPE_FORUM_POST/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/TYPE_MESSAGE/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/TYPE_PINGBACK/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/TYPE_REPLY/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/TYPE_SIGNUP/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/TYPE_TRACKBACK/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/TYPE_TWEET/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment///PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/AkismetComment/#jakarta.servlet.http.HttpServletRequest/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/AkismetComment/#kotlin.String#kotlin.String/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/author/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/authorEmail/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/authorUrl/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/blogCharset/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/blogLang/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/content/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/dateGmt/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/equals/#kotlin.Any?/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/hashCode/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/isTest/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/permalink/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/postModifiedGmt/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/recheckReason/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/referrer/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/serverEnv/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/toJson/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/toString/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/type/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/userAgent/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/userIp/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html -$dokka.location:net.thauvin.erik.akismet/AkismetComment/userRole/#/PointingToDeclaration/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html -net.thauvin.erik.akismet - diff --git a/docs/images/anchor-copy-button.svg b/docs/images/anchor-copy-button.svg index bab9d74..19c1fa3 100644 --- a/docs/images/anchor-copy-button.svg +++ b/docs/images/anchor-copy-button.svg @@ -1,4 +1,8 @@ + + - \ No newline at end of file + diff --git a/docs/images/arrow_down.svg b/docs/images/arrow_down.svg index c0388de..639aaf1 100644 --- a/docs/images/arrow_down.svg +++ b/docs/images/arrow_down.svg @@ -1,3 +1,7 @@ + + - \ No newline at end of file + diff --git a/docs/images/burger.svg b/docs/images/burger.svg index d6dcefc..fcca732 100644 --- a/docs/images/burger.svg +++ b/docs/images/burger.svg @@ -1,5 +1,9 @@ + + - \ No newline at end of file + diff --git a/docs/images/copy-icon.svg b/docs/images/copy-icon.svg index 61440f0..2cb02ec 100644 --- a/docs/images/copy-icon.svg +++ b/docs/images/copy-icon.svg @@ -1,3 +1,7 @@ + + - \ No newline at end of file + diff --git a/docs/images/copy-successful-icon.svg b/docs/images/copy-successful-icon.svg index 1865f73..c4b9538 100644 --- a/docs/images/copy-successful-icon.svg +++ b/docs/images/copy-successful-icon.svg @@ -1,3 +1,7 @@ + + - \ No newline at end of file + diff --git a/docs/images/footer-go-to-link.svg b/docs/images/footer-go-to-link.svg index 0137e22..a87add7 100644 --- a/docs/images/footer-go-to-link.svg +++ b/docs/images/footer-go-to-link.svg @@ -1,3 +1,7 @@ + + - \ No newline at end of file + diff --git a/docs/images/go-to-top-icon.svg b/docs/images/go-to-top-icon.svg index d987f3e..abc3d1c 100644 --- a/docs/images/go-to-top-icon.svg +++ b/docs/images/go-to-top-icon.svg @@ -1,4 +1,8 @@ + + - \ No newline at end of file + diff --git a/docs/images/homepage.svg b/docs/images/homepage.svg new file mode 100644 index 0000000..e3c83b1 --- /dev/null +++ b/docs/images/homepage.svg @@ -0,0 +1,3 @@ + + + diff --git a/docs/images/logo-icon.svg b/docs/images/logo-icon.svg index 1fea087..e42f957 100644 --- a/docs/images/logo-icon.svg +++ b/docs/images/logo-icon.svg @@ -1,3 +1,7 @@ + + @@ -7,4 +11,4 @@ - \ No newline at end of file + diff --git a/docs/images/nav-icons/abstract-class-kotlin.svg b/docs/images/nav-icons/abstract-class-kotlin.svg index a2069b8..19d6148 100644 --- a/docs/images/nav-icons/abstract-class-kotlin.svg +++ b/docs/images/nav-icons/abstract-class-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/docs/images/nav-icons/annotation-kotlin.svg b/docs/images/nav-icons/annotation-kotlin.svg index 932f1d3..b90f508 100644 --- a/docs/images/nav-icons/annotation-kotlin.svg +++ b/docs/images/nav-icons/annotation-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/docs/images/nav-icons/class-kotlin.svg b/docs/images/nav-icons/class-kotlin.svg index 46a21f6..797a242 100644 --- a/docs/images/nav-icons/class-kotlin.svg +++ b/docs/images/nav-icons/class-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/docs/images/nav-icons/enum-kotlin.svg b/docs/images/nav-icons/enum-kotlin.svg index 4a85459..775a7cc 100644 --- a/docs/images/nav-icons/enum-kotlin.svg +++ b/docs/images/nav-icons/enum-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/docs/images/nav-icons/field-value.svg b/docs/images/nav-icons/field-value.svg index 20449c9..2771ee5 100644 --- a/docs/images/nav-icons/field-value.svg +++ b/docs/images/nav-icons/field-value.svg @@ -1,3 +1,7 @@ + + diff --git a/docs/images/nav-icons/field-variable.svg b/docs/images/nav-icons/field-variable.svg index 3b07450..e2d2bbd 100644 --- a/docs/images/nav-icons/field-variable.svg +++ b/docs/images/nav-icons/field-variable.svg @@ -1,3 +1,7 @@ + + diff --git a/docs/images/nav-icons/interface-kotlin.svg b/docs/images/nav-icons/interface-kotlin.svg index bf07a14..5e16326 100644 --- a/docs/images/nav-icons/interface-kotlin.svg +++ b/docs/images/nav-icons/interface-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/docs/images/nav-icons/object.svg b/docs/images/nav-icons/object.svg index 9f427de..31f0ee3 100644 --- a/docs/images/nav-icons/object.svg +++ b/docs/images/nav-icons/object.svg @@ -1,3 +1,7 @@ + + diff --git a/docs/images/nav-icons/typealias-kotlin.svg b/docs/images/nav-icons/typealias-kotlin.svg index 4795069..f4bb238 100644 --- a/docs/images/nav-icons/typealias-kotlin.svg +++ b/docs/images/nav-icons/typealias-kotlin.svg @@ -1,3 +1,7 @@ + + diff --git a/docs/images/theme-toggle.svg b/docs/images/theme-toggle.svg index dad3ff2..df86202 100644 --- a/docs/images/theme-toggle.svg +++ b/docs/images/theme-toggle.svg @@ -1,3 +1,7 @@ + + - \ No newline at end of file + diff --git a/docs/index.html b/docs/index.html index 5de1b65..798d096 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,7 +2,7 @@ - akismet-kotlin + Akismet Kotlin @@ -41,14 +41,14 @@
-1.0.0
+1.1.0-SNAPSHOT
- +
-
+
-

akismet-kotlin

-

Akismet for Kotlin/Java, a client library for accessing the Automattic Kismet (Akismet) spam comments filtering service.

package net.thauvin.erik.akismet

A Kotlin/Java library for accessing the Akismet service.

+

Akismet Kotlin

Packages

-
-
+
+
- - + +
Link copied to clipboard
- +
-
+
+

A Kotlin/Java library for accessing the Akismet service.

+
diff --git a/docs/navigation.html b/docs/navigation.html index a83bc16..8d2ea7d 100644 --- a/docs/navigation.html +++ b/docs/navigation.html @@ -1,17 +1,29 @@ -
- -
- -
- -
- +
+ +
+ + -
- - diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html new file mode 100644 index 0000000..c4dc2d9 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html @@ -0,0 +1,80 @@ + + + + + AkismetComment + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AkismetComment

+
+
constructor(request: <Error class: unknown class>)

Creates a new instance extracting the userIp, userAgent, referrer and serverEnv environment variables from a Servlet request.

See the Akismet API for more details.

See also


constructor(config: CommentConfig)


constructor(userIp: String, userAgent: String)

Creates a new instance.

See the Akismet API for more details.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html new file mode 100644 index 0000000..5313584 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html @@ -0,0 +1,80 @@ + + + + + ADMIN_ROLE + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

ADMIN_ROLE

+
+
const val ADMIN_ROLE: String

Administrator role. If used, Akismet will always return false.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html new file mode 100644 index 0000000..be496c0 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html @@ -0,0 +1,104 @@ + + + + + Companion + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Companion

+
object Companion
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
const val ADMIN_ROLE: String

Administrator role. If used, Akismet will always return false.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/author-email.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/author-email.html new file mode 100644 index 0000000..39a43b3 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/author-email.html @@ -0,0 +1,80 @@ + + + + + authorEmail + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

authorEmail

+
+

Email address submitted with the comment.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/author-url.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/author-url.html new file mode 100644 index 0000000..4fc00f8 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/author-url.html @@ -0,0 +1,80 @@ + + + + + authorUrl + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

authorUrl

+
+

URL submitted with comment.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/author.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/author.html new file mode 100644 index 0000000..6d6acda --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/author.html @@ -0,0 +1,80 @@ + + + + + author + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

author

+
+

Name submitted with the comment.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html new file mode 100644 index 0000000..95d456a --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html @@ -0,0 +1,80 @@ + + + + + blogCharset + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blogCharset

+
+

The character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html new file mode 100644 index 0000000..87f364e --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html @@ -0,0 +1,80 @@ + + + + + blogLang + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blogLang

+
+

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/root/net.thauvin.erik.akismet/-akismet-comment/content.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/content.html new file mode 100644 index 0000000..744a94f --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/content.html @@ -0,0 +1,80 @@ + + + + + content + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

content

+
+

The content that was submitted.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html new file mode 100644 index 0000000..bf91cd0 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html @@ -0,0 +1,80 @@ + + + + + dateGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dateGmt

+
+

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

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/equals.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/equals.html new file mode 100644 index 0000000..1d016a3 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/equals.html @@ -0,0 +1,80 @@ + + + + + equals + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

equals

+
+
open operator override fun equals(other: Any?): Boolean

Indicates whether some other object is equal to this one.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/hash-code.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/hash-code.html new file mode 100644 index 0000000..f0b4cf5 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/hash-code.html @@ -0,0 +1,80 @@ + + + + + hashCode + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

hashCode

+
+
open override fun hashCode(): Int

Returns a hash code value for the object.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/index.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/index.html new file mode 100644 index 0000000..c32b8f2 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/index.html @@ -0,0 +1,446 @@ + + + + + AkismetComment + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

AkismetComment

+
open class AkismetComment(val userIp: String, val userAgent: String)

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 for more details.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(request: <Error class: unknown class>)

Creates a new instance extracting the userIp, userAgent, referrer and serverEnv environment variables from a Servlet request.

constructor(config: CommentConfig)
constructor(userIp: String, userAgent: String)

Creates a new instance.

+
+
+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
object Companion
+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

Name submitted with the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Email address submitted with the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

URL submitted with comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Indicates the language(s) in use on the blog or site, in ISO 639-1 format, comma-separated.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The content that was submitted.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The UTC timestamp of the creation of the comment, in ISO 8601 format.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

This is an optional parameter. You can use it when submitting test queries to Akismet.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The full permanent URL of the entry the comment was submitted to.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

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.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The content of the referer header should be set here.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

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.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

A string that describes the type of content being sent, such as:

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The user role of the user who submitted the comment. This is an optional parameter.

+
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
open operator override fun equals(other: Any?): Boolean

Indicates whether some other object is equal to this one.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
open override fun hashCode(): Int

Returns a hash code value for the object.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun toJson(): String

Returns a JSON representation of the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
open override fun toString(): String

Returns a JSON representation of the comment.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/is-test.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/is-test.html new file mode 100644 index 0000000..71b3c62 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/is-test.html @@ -0,0 +1,80 @@ + + + + + isTest + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isTest

+
+

This is an optional parameter. You can use it when submitting test queries to Akismet.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/permalink.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/permalink.html new file mode 100644 index 0000000..5f18f9f --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/permalink.html @@ -0,0 +1,80 @@ + + + + + permalink + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

permalink

+
+

The full permanent URL of the entry the comment was submitted to.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html new file mode 100644 index 0000000..8674bcf --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html @@ -0,0 +1,80 @@ + + + + + postModifiedGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

postModifiedGmt

+
+

The UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

See also

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html new file mode 100644 index 0000000..82e0075 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html @@ -0,0 +1,80 @@ + + + + + recheckReason + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

recheckReason

+
+

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/root/net.thauvin.erik.akismet/-akismet-comment/referrer.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/referrer.html new file mode 100644 index 0000000..a9a67a1 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/referrer.html @@ -0,0 +1,80 @@ + + + + + referrer + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

referrer

+
+

The content of the referer header should be set here.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/server-env.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/server-env.html new file mode 100644 index 0000000..e92a50e --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/server-env.html @@ -0,0 +1,80 @@ + + + + + serverEnv + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

serverEnv

+
+

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/root/net.thauvin.erik.akismet/-akismet-comment/to-json.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/to-json.html new file mode 100644 index 0000000..bc88e62 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/to-json.html @@ -0,0 +1,80 @@ + + + + + toJson + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

toJson

+
+
fun toJson(): String

Returns a JSON representation of the comment.

See also

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/to-string.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/to-string.html new file mode 100644 index 0000000..f61a2d9 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/to-string.html @@ -0,0 +1,80 @@ + + + + + toString + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

toString

+
+
open override fun toString(): String

Returns a JSON representation of the comment.

See also

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/type.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/type.html new file mode 100644 index 0000000..8e18d92 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/type.html @@ -0,0 +1,80 @@ + + + + + type + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

type

+
+

A string that describes the type of content being sent, such as:

You may send a value not listed above if none of them accurately describe your content.

This is further explained here.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/user-agent.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/user-agent.html new file mode 100644 index 0000000..6127697 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/user-agent.html @@ -0,0 +1,80 @@ + + + + + userAgent + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userAgent

+
+

Parameters

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/user-ip.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/user-ip.html new file mode 100644 index 0000000..1fbc4a0 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/user-ip.html @@ -0,0 +1,80 @@ + + + + + userIp + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userIp

+
+

Parameters

userIp

IP address of the comment submitter.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet-comment/user-role.html b/docs/root/net.thauvin.erik.akismet/-akismet-comment/user-role.html new file mode 100644 index 0000000..41435e8 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet-comment/user-role.html @@ -0,0 +1,80 @@ + + + + + userRole + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userRole

+
+

The user role of the user who submitted the comment. This is an optional parameter.

If you set it to ADMIN_ROLE, Akismet will always return false.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/-akismet.html b/docs/root/net.thauvin.erik.akismet/-akismet/-akismet.html new file mode 100644 index 0000000..a37f73b --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/-akismet.html @@ -0,0 +1,80 @@ + + + + + Akismet + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Akismet

+
+
constructor(apiKey: String, blog: String)

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


constructor(apiKey: String)

Creates a new instance using the provided Akismet API key.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html b/docs/root/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html new file mode 100644 index 0000000..d90afff --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html @@ -0,0 +1,80 @@ + + + + + dateToGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dateToGmt

+
+
fun dateToGmt(date: Date): String

Converts a date to a UTC timestamp. (ISO 8601)

See also


Converts a locale date/time to a UTC timestamp. (ISO 8601)

See also

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/-companion/index.html b/docs/root/net.thauvin.erik.akismet/-akismet/-companion/index.html new file mode 100644 index 0000000..88e459c --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/-companion/index.html @@ -0,0 +1,119 @@ + + + + + Companion + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Companion

+
object Companion
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

Converts a locale date/time to a UTC timestamp. (ISO 8601)

fun dateToGmt(date: Date): String

Converts a date to a UTC timestamp. (ISO 8601)

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

(Re)Creates a comment from a JSON string.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html b/docs/root/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html new file mode 100644 index 0000000..8fae673 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html @@ -0,0 +1,80 @@ + + + + + jsonComment + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

jsonComment

+
+

(Re)Creates a comment from a JSON string.

See also

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/app-user-agent.html b/docs/root/net.thauvin.erik.akismet/-akismet/app-user-agent.html new file mode 100644 index 0000000..b2ad48f --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/app-user-agent.html @@ -0,0 +1,80 @@ + + + + + appUserAgent + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

appUserAgent

+
+

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 for more details.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/blog.html b/docs/root/net.thauvin.erik.akismet/-akismet/blog.html new file mode 100644 index 0000000..06fe121 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/blog.html @@ -0,0 +1,80 @@ + + + + + blog + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blog

+
+

The URL registered with Akismet.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/check-comment.html b/docs/root/net.thauvin.erik.akismet/-akismet/check-comment.html new file mode 100644 index 0000000..1624ea3 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/check-comment.html @@ -0,0 +1,80 @@ + + + + + checkComment + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

checkComment

+
+
fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean

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 for more details.

Return

true if the comment is spam, false if the comment is not.

Parameters

trueOnError

Set to return true on error.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/debug-help.html b/docs/root/net.thauvin.erik.akismet/-akismet/debug-help.html new file mode 100644 index 0000000..7042eab --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/debug-help.html @@ -0,0 +1,80 @@ + + + + + debugHelp + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

debugHelp

+
+

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 for more details.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/error-message.html b/docs/root/net.thauvin.erik.akismet/-akismet/error-message.html new file mode 100644 index 0000000..8cdc08e --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/error-message.html @@ -0,0 +1,80 @@ + + + + + errorMessage + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

errorMessage

+
+

The error message.

The error (IO, empty response from Akismet, etc.) message is also logged as a warning.

See also

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/execute-method.html b/docs/root/net.thauvin.erik.akismet/-akismet/execute-method.html new file mode 100644 index 0000000..fa730ea --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/execute-method.html @@ -0,0 +1,80 @@ + + + + + executeMethod + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

executeMethod

+
+
fun executeMethod(apiUrl: <Error class: unknown class>, formBody: <Error class: unknown class>, trueOnError: Boolean = false): Boolean

Executes a call to an Akismet REST API method.

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

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/http-status-code.html b/docs/root/net.thauvin.erik.akismet/-akismet/http-status-code.html new file mode 100644 index 0000000..51a6eb8 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/http-status-code.html @@ -0,0 +1,80 @@ + + + + + httpStatusCode + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

httpStatusCode

+
+

The HTTP status code of the last operation.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/index.html b/docs/root/net.thauvin.erik.akismet/-akismet/index.html new file mode 100644 index 0000000..f8deedb --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/index.html @@ -0,0 +1,371 @@ + + + + + Akismet + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Akismet

+
open class Akismet(apiKey: String)

Provides access to the Akismet API.

+
+
+
+
+
+

Constructors

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

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

constructor(apiKey: String)

Creates a new instance using the provided Akismet API key.

+
+
+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
object Companion
+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

The application user agent to be sent to Akismet.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The URL registered with Akismet.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

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

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The error message.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The HTTP status code of the last operation.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Set to true if the API Key has been verified.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The logger instance.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

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

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

The actual response sent by Akismet from the last operation.

+
+
+
+
+
+
+
+

Functions

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

Comment Check.

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

Executes a call to an Akismet REST API method.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Submit Ham. (False Positives)

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Submit Spam. (Missed Spam)

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Key Verification.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/is-discard.html b/docs/root/net.thauvin.erik.akismet/-akismet/is-discard.html new file mode 100644 index 0000000..b6320e1 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/is-discard.html @@ -0,0 +1,80 @@ + + + + + isDiscard + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isDiscard

+
+

Set to true if Akismet has determined that the last checked comment is blatant spam, and you can safely discard it without saving it in any spam queue.

See the Akismet API for more details.

See also

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/is-verified-key.html b/docs/root/net.thauvin.erik.akismet/-akismet/is-verified-key.html new file mode 100644 index 0000000..9842b5f --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/is-verified-key.html @@ -0,0 +1,80 @@ + + + + + isVerifiedKey + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isVerifiedKey

+
+

Set to true if the API Key has been verified.

See also

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/logger.html b/docs/root/net.thauvin.erik.akismet/-akismet/logger.html new file mode 100644 index 0000000..c037a09 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/logger.html @@ -0,0 +1,80 @@ + + + + + logger + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

logger

+
+

The logger instance.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/pro-tip.html b/docs/root/net.thauvin.erik.akismet/-akismet/pro-tip.html new file mode 100644 index 0000000..04b1892 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/pro-tip.html @@ -0,0 +1,80 @@ + + + + + proTip + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

proTip

+
+

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 for more details.

See also

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/reset.html b/docs/root/net.thauvin.erik.akismet/-akismet/reset.html new file mode 100644 index 0000000..bf460c2 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/reset.html @@ -0,0 +1,80 @@ + + + + + reset + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

reset

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/response.html b/docs/root/net.thauvin.erik.akismet/-akismet/response.html new file mode 100644 index 0000000..d973e99 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/response.html @@ -0,0 +1,80 @@ + + + + + response + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

response

+
+

The actual response sent by Akismet from the last operation.

For example: true, false, valid, invalid, etc.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/submit-ham.html b/docs/root/net.thauvin.erik.akismet/-akismet/submit-ham.html new file mode 100644 index 0000000..6f0b288 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/submit-ham.html @@ -0,0 +1,80 @@ + + + + + submitHam + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

submitHam

+
+

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 and submit spam.

It is very important that the values you submit with this call match those of your comment check 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 for more details.

Return

true if the comment was submitted, false otherwise.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/submit-spam.html b/docs/root/net.thauvin.erik.akismet/-akismet/submit-spam.html new file mode 100644 index 0000000..855a3f2 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/submit-spam.html @@ -0,0 +1,80 @@ + + + + + submitSpam + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

submitSpam

+
+

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 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 for more details.

Return

true if the comment was submitted, false otherwise.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-akismet/verify-key.html b/docs/root/net.thauvin.erik.akismet/-akismet/verify-key.html new file mode 100644 index 0000000..1c92d1e --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-akismet/verify-key.html @@ -0,0 +1,80 @@ + + + + + verifyKey + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

verifyKey

+
+

Key Verification.

Key verification authenticates your key before calling the comment check, submit spam, or submit ham 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 for more details.

Return

true if the key is valid, false otherwise.

See also

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/-builder.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/-builder.html new file mode 100644 index 0000000..a6c53d6 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/-builder.html @@ -0,0 +1,80 @@ + + + + + Builder + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Builder

+
+
constructor(userIp: String, userAgent: String)

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html new file mode 100644 index 0000000..af5bad5 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html @@ -0,0 +1,80 @@ + + + + + authorEmail + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

authorEmail

+
+

Sets the email address submitted with the comment.


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html new file mode 100644 index 0000000..8494e23 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html @@ -0,0 +1,80 @@ + + + + + authorUrl + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

authorUrl

+
+

Sets the URL submitted with comment.


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/author.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/author.html new file mode 100644 index 0000000..6407357 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/author.html @@ -0,0 +1,80 @@ + + + + + author + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

author

+
+

Sets the mame submitted with the comment.


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html new file mode 100644 index 0000000..0a9fc21 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html @@ -0,0 +1,80 @@ + + + + + blogCharset + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blogCharset

+
+

Sets the character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html new file mode 100644 index 0000000..59190c3 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html @@ -0,0 +1,80 @@ + + + + + blogLang + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blogLang

+
+

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/root/net.thauvin.erik.akismet/-comment-config/-builder/build.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/build.html new file mode 100644 index 0000000..72cde0b --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/build.html @@ -0,0 +1,80 @@ + + + + + build + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

build

+
+

Builds a new comment configuration.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/content.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/content.html new file mode 100644 index 0000000..f9819b7 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/content.html @@ -0,0 +1,80 @@ + + + + + content + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

content

+
+

Sets the content that was submitted.


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html new file mode 100644 index 0000000..b406e6e --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html @@ -0,0 +1,80 @@ + + + + + dateGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dateGmt

+
+

Sets 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


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/index.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/index.html new file mode 100644 index 0000000..7208193 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/index.html @@ -0,0 +1,637 @@ + + + + + Builder + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Builder

+
data class Builder(var userIp: String, var userAgent: String)

Provides a configuration builder.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(userIp: String, userAgent: String)
+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the mame submitted with the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the email address submitted with the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the URL submitted with comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Indicates the language(s) in use on the blog or site, in ISO 639-1 format, comma-separated.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Builds a new comment configuration.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the content that was submitted.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the UTC timestamp of the creation of the comment, in ISO 8601 format.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

This is optional. You can set it when submitting test queries to Akismet.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the full permanent URL of the entry the comment was submitted to.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

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.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the content of the referrer header.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

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.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets a string that describes the type of content being sent, such as:

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the user agent string of the web browser submitting the comment.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Sets the IP address of the comment submitter.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Set the user role of the user who submitted the comment. This is an optional parameter.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html new file mode 100644 index 0000000..c76fffb --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html @@ -0,0 +1,80 @@ + + + + + isTest + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isTest

+
+

This is optional. You can set it when submitting test queries to Akismet.


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html new file mode 100644 index 0000000..a298025 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html @@ -0,0 +1,80 @@ + + + + + permalink + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

permalink

+
+

Sets the full permanent URL of the entry the comment was submitted to.


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html new file mode 100644 index 0000000..8efb333 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html @@ -0,0 +1,80 @@ + + + + + postModifiedGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

postModifiedGmt

+
+

Sets the UTC timestamp of the publication time for the post, page or thread on which the comment was posted.

See also


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html new file mode 100644 index 0000000..c6efd7c --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html @@ -0,0 +1,80 @@ + + + + + recheckReason + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

recheckReason

+
+

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/root/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html new file mode 100644 index 0000000..19b3f1e --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html @@ -0,0 +1,80 @@ + + + + + referrer + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

referrer

+
+

Sets the content of the referrer header.


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html new file mode 100644 index 0000000..6fd5770 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html @@ -0,0 +1,80 @@ + + + + + serverEnv + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

serverEnv

+
+

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/root/net.thauvin.erik.akismet/-comment-config/-builder/type.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/type.html new file mode 100644 index 0000000..1013420 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/type.html @@ -0,0 +1,80 @@ + + + + + type + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

type

+
+

Sets a string that describes the type of content being sent, such as:

You may send a value not listed above if none of them accurately describe your content.

This is further explained here.


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html new file mode 100644 index 0000000..70fd9f9 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html @@ -0,0 +1,80 @@ + + + + + userAgent + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userAgent

+
+

Sets the user agent string of the web browser submitting the comment.


Parameters

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html new file mode 100644 index 0000000..b368893 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html @@ -0,0 +1,80 @@ + + + + + userIp + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userIp

+
+

Sets the IP address of the comment submitter.


Parameters

userIp

IP address of the comment submitter.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html new file mode 100644 index 0000000..b28cd4d --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html @@ -0,0 +1,80 @@ + + + + + userRole + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userRole

+
+

Set the user role of the user who submitted the comment. This is an optional parameter.

If you set it to ADMIN_ROLE, Akismet will always return false.


+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/-comment-config.html b/docs/root/net.thauvin.erik.akismet/-comment-config/-comment-config.html new file mode 100644 index 0000000..bd0b374 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/-comment-config.html @@ -0,0 +1,80 @@ + + + + + CommentConfig + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

CommentConfig

+
+
constructor(builder: CommentConfig.Builder)


constructor(userIp: String, userAgent: String, referrer: String = "", permalink: String = "", type: CommentType = CommentType.NONE, author: String = "", authorEmail: String = "", authorUrl: String = "", content: String = "", dateGmt: String = "", postModifiedGmt: String = "", blogLang: String = "", blogCharset: String = "", userRole: String = "", isTest: Boolean = false, recheckReason: String = "", serverEnv: Map<String, String> = emptyMap())

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/author-email.html b/docs/root/net.thauvin.erik.akismet/-comment-config/author-email.html new file mode 100644 index 0000000..0702758 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/author-email.html @@ -0,0 +1,80 @@ + + + + + authorEmail + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

authorEmail

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/author-url.html b/docs/root/net.thauvin.erik.akismet/-comment-config/author-url.html new file mode 100644 index 0000000..342b7cc --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/author-url.html @@ -0,0 +1,80 @@ + + + + + authorUrl + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

authorUrl

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/author.html b/docs/root/net.thauvin.erik.akismet/-comment-config/author.html new file mode 100644 index 0000000..658fcae --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/author.html @@ -0,0 +1,80 @@ + + + + + author + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

author

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/blog-charset.html b/docs/root/net.thauvin.erik.akismet/-comment-config/blog-charset.html new file mode 100644 index 0000000..e202aa9 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/blog-charset.html @@ -0,0 +1,80 @@ + + + + + blogCharset + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blogCharset

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/blog-lang.html b/docs/root/net.thauvin.erik.akismet/-comment-config/blog-lang.html new file mode 100644 index 0000000..8e9a388 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/blog-lang.html @@ -0,0 +1,80 @@ + + + + + blogLang + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

blogLang

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/content.html b/docs/root/net.thauvin.erik.akismet/-comment-config/content.html new file mode 100644 index 0000000..66718fd --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/content.html @@ -0,0 +1,80 @@ + + + + + content + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

content

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/date-gmt.html b/docs/root/net.thauvin.erik.akismet/-comment-config/date-gmt.html new file mode 100644 index 0000000..4999017 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/date-gmt.html @@ -0,0 +1,80 @@ + + + + + dateGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

dateGmt

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/index.html b/docs/root/net.thauvin.erik.akismet/-comment-config/index.html new file mode 100644 index 0000000..dd918a2 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/index.html @@ -0,0 +1,382 @@ + + + + + CommentConfig + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

CommentConfig

+
class CommentConfig constructor(var userIp: String, var userAgent: String, var referrer: String = "", var permalink: String = "", var type: CommentType = CommentType.NONE, var author: String = "", var authorEmail: String = "", var authorUrl: String = "", var content: String = "", var dateGmt: String = "", var postModifiedGmt: String = "", var blogLang: String = "", var blogCharset: String = "", var userRole: String = "", var isTest: Boolean = false, var recheckReason: String = "", var serverEnv: Map<String, String> = emptyMap())

Provides a comment configuration.

Parameters

userIp

IP address of the comment submitter.

userAgent

User agent string of the web browser submitting the comment.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(builder: CommentConfig.Builder)
constructor(userIp: String, userAgent: String, referrer: String = "", permalink: String = "", type: CommentType = CommentType.NONE, author: String = "", authorEmail: String = "", authorUrl: String = "", content: String = "", dateGmt: String = "", postModifiedGmt: String = "", blogLang: String = "", blogCharset: String = "", userRole: String = "", isTest: Boolean = false, recheckReason: String = "", serverEnv: Map<String, String> = emptyMap())
+
+
+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
data class Builder(var userIp: String, var userAgent: String)

Provides a configuration builder.

+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/is-test.html b/docs/root/net.thauvin.erik.akismet/-comment-config/is-test.html new file mode 100644 index 0000000..3c48603 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/is-test.html @@ -0,0 +1,80 @@ + + + + + isTest + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

isTest

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/permalink.html b/docs/root/net.thauvin.erik.akismet/-comment-config/permalink.html new file mode 100644 index 0000000..0274fb2 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/permalink.html @@ -0,0 +1,80 @@ + + + + + permalink + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

permalink

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/post-modified-gmt.html b/docs/root/net.thauvin.erik.akismet/-comment-config/post-modified-gmt.html new file mode 100644 index 0000000..e548982 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/post-modified-gmt.html @@ -0,0 +1,80 @@ + + + + + postModifiedGmt + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

postModifiedGmt

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/recheck-reason.html b/docs/root/net.thauvin.erik.akismet/-comment-config/recheck-reason.html new file mode 100644 index 0000000..dff0869 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/recheck-reason.html @@ -0,0 +1,80 @@ + + + + + recheckReason + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

recheckReason

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/referrer.html b/docs/root/net.thauvin.erik.akismet/-comment-config/referrer.html new file mode 100644 index 0000000..f332715 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/referrer.html @@ -0,0 +1,80 @@ + + + + + referrer + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

referrer

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/server-env.html b/docs/root/net.thauvin.erik.akismet/-comment-config/server-env.html new file mode 100644 index 0000000..aada008 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/server-env.html @@ -0,0 +1,80 @@ + + + + + serverEnv + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

serverEnv

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/type.html b/docs/root/net.thauvin.erik.akismet/-comment-config/type.html new file mode 100644 index 0000000..f5cd94f --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/type.html @@ -0,0 +1,80 @@ + + + + + type + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

type

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/user-agent.html b/docs/root/net.thauvin.erik.akismet/-comment-config/user-agent.html new file mode 100644 index 0000000..a9553f7 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/user-agent.html @@ -0,0 +1,80 @@ + + + + + userAgent + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userAgent

+
+

Parameters

userAgent

User agent string of the web browser submitting the comment.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/user-ip.html b/docs/root/net.thauvin.erik.akismet/-comment-config/user-ip.html new file mode 100644 index 0000000..3102481 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/user-ip.html @@ -0,0 +1,80 @@ + + + + + userIp + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userIp

+
+

Parameters

userIp

IP address of the comment submitter.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-config/user-role.html b/docs/root/net.thauvin.erik.akismet/-comment-config/user-role.html new file mode 100644 index 0000000..af1c1b8 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-config/user-role.html @@ -0,0 +1,80 @@ + + + + + userRole + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

userRole

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-comment-type.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-comment-type.html new file mode 100644 index 0000000..3e4278f --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-comment-type.html @@ -0,0 +1,80 @@ + + + + + CommentType + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

CommentType

+
+
constructor(value: String)
+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-b-l-o-g_-p-o-s-t.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-b-l-o-g_-p-o-s-t.html new file mode 100644 index 0000000..8b14809 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-b-l-o-g_-p-o-s-t.html @@ -0,0 +1,80 @@ + + + + + BLOG_POST + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

BLOG_POST

+
+

A blog post.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-m-m-e-n-t.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-m-m-e-n-t.html new file mode 100644 index 0000000..e3b36ed --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-m-m-e-n-t.html @@ -0,0 +1,80 @@ + + + + + COMMENT + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

COMMENT

+
+

A blog comment.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-n-t-a-c-t_-f-o-r-m.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-n-t-a-c-t_-f-o-r-m.html new file mode 100644 index 0000000..f02eb18 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-n-t-a-c-t_-f-o-r-m.html @@ -0,0 +1,80 @@ + + + + + CONTACT_FORM + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

CONTACT_FORM

+
+

A contact form or feedback form submission.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-f-o-r-u-m_-p-o-s-t.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-f-o-r-u-m_-p-o-s-t.html new file mode 100644 index 0000000..224ba40 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-f-o-r-u-m_-p-o-s-t.html @@ -0,0 +1,80 @@ + + + + + FORUM_POST + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

FORUM_POST

+
+

A top-level forum post.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-m-e-s-s-a-g-e.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-m-e-s-s-a-g-e.html new file mode 100644 index 0000000..09b8770 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-m-e-s-s-a-g-e.html @@ -0,0 +1,80 @@ + + + + + MESSAGE + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

MESSAGE

+
+

A message sent between just a few users.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-n-o-n-e.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-n-o-n-e.html new file mode 100644 index 0000000..b8a3ece --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-n-o-n-e.html @@ -0,0 +1,80 @@ + + + + + NONE + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

NONE

+
+

Undefined type.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-p-i-n-g-b-a-c-k.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-p-i-n-g-b-a-c-k.html new file mode 100644 index 0000000..4771580 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-p-i-n-g-b-a-c-k.html @@ -0,0 +1,80 @@ + + + + + PINGBACK + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

PINGBACK

+
+

A pingback.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-r-e-p-l-y.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-r-e-p-l-y.html new file mode 100644 index 0000000..8685765 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-r-e-p-l-y.html @@ -0,0 +1,80 @@ + + + + + REPLY + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

REPLY

+
+

A reply to a top-level forum post.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-s-i-g-n-u-p.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-s-i-g-n-u-p.html new file mode 100644 index 0000000..9031d4a --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-s-i-g-n-u-p.html @@ -0,0 +1,80 @@ + + + + + SIGNUP + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

SIGNUP

+
+

A new user account.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-t-r-a-c-k-b-a-c-k.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-t-r-a-c-k-b-a-c-k.html new file mode 100644 index 0000000..2c06ff2 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-t-r-a-c-k-b-a-c-k.html @@ -0,0 +1,80 @@ + + + + + TRACKBACK + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

TRACKBACK

+
+

A trackback.

+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-t-w-e-e-t.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-t-w-e-e-t.html new file mode 100644 index 0000000..553ac98 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/-t-w-e-e-t.html @@ -0,0 +1,80 @@ + + + + + TWEET + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

TWEET

+
+

A Twitter message.

+
+ +
+
+
+ + diff --git a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/index.html similarity index 50% rename from docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html rename to docs/root/net.thauvin.erik.akismet/-comment-type/-companion/index.html index d314474..6fdb31f 100644 --- a/docs/akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/-companion/index.html @@ -41,14 +41,14 @@
-1.0.0
+
- +
-
- +
+

Companion

- +
object Companion

Properties

-
-
+
+
- - + +
Link copied to clipboard
-
const val ADMIN_ROLE: String

Administrator role. If used, Akismet will always return false.

+

A blog post.

- -
+ +
- - + +
Link copied to clipboard
-

A blog post.

+

A blog comment.

- -
+ +
- - + +
Link copied to clipboard
-
const val TYPE_COMMENT: String

A blog comment.

+

A contact form or feedback form submission.

- -
+ +
- - + +
Link copied to clipboard
-

A contact form or feedback form submission.

+

A top-level forum post.

- -
+ +
- - + +
Link copied to clipboard
-

A top-level forum post.

+

A message sent between just a few users.

- -
+ +
- - + +
Link copied to clipboard
-
const val TYPE_MESSAGE: String

A message sent between just a few users.

+

Undefined type.

- -
+ +
- - + +
Link copied to clipboard
-

A pingback.

+

A pingback.

- -
+ +
- - + +
Link copied to clipboard
-
const val TYPE_REPLY: String

A reply to a top-level forum post.

+

A reply to a top-level forum post.

- -
+ +
- - + +
Link copied to clipboard
-
const val TYPE_SIGNUP: String

A new user account.

+

A new user account.

- -
+ +
- - + +
Link copied to clipboard
-

A trackback.

+

A trackback.

- -
+ +
- - + +
Link copied to clipboard
-
const val TYPE_TWEET: String

A Twitter message.

+

A Twitter message.

@@ -243,7 +243,7 @@
diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/index.html b/docs/root/net.thauvin.erik.akismet/-comment-type/index.html new file mode 100644 index 0000000..e0c2306 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/index.html @@ -0,0 +1,142 @@ + + + + + CommentType + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

CommentType

+
data class CommentType(var value: String)

Defines the comment types.

+
+
+
+
+
+

Constructors

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
constructor(value: String)
+
+
+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
object Companion
+
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/-comment-type/value.html b/docs/root/net.thauvin.erik.akismet/-comment-type/value.html new file mode 100644 index 0000000..07cce74 --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/-comment-type/value.html @@ -0,0 +1,80 @@ + + + + + value + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

value

+
+ +
+ +
+
+
+ + diff --git a/docs/root/net.thauvin.erik.akismet/index.html b/docs/root/net.thauvin.erik.akismet/index.html new file mode 100644 index 0000000..766f3df --- /dev/null +++ b/docs/root/net.thauvin.erik.akismet/index.html @@ -0,0 +1,148 @@ + + + + + net.thauvin.erik.akismet + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Package-level declarations

+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
open class Akismet(apiKey: String)

Provides access to the Akismet API.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
open class AkismetComment(val userIp: String, val userAgent: String)

A comment to send to Akismet.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
class CommentConfig constructor(var userIp: String, var userAgent: String, var referrer: String = "", var permalink: String = "", var type: CommentType = CommentType.NONE, var author: String = "", var authorEmail: String = "", var authorUrl: String = "", var content: String = "", var dateGmt: String = "", var postModifiedGmt: String = "", var blogLang: String = "", var blogCharset: String = "", var userRole: String = "", var isTest: Boolean = false, var recheckReason: String = "", var serverEnv: Map<String, String> = emptyMap())

Provides a comment configuration.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
data class CommentType(var value: String)

Defines the comment types.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + diff --git a/docs/root/package-list b/docs/root/package-list new file mode 100644 index 0000000..2b8e2fd --- /dev/null +++ b/docs/root/package-list @@ -0,0 +1,127 @@ +$dokka.format:html-v1 +$dokka.linkExtension:html +$dokka.location:net.thauvin.erik.akismet////PointingToDeclaration/root/net.thauvin.erik.akismet/index.html +$dokka.location:net.thauvin.erik.akismet/Akismet.Companion///PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/-companion/index.html +$dokka.location:net.thauvin.erik.akismet/Akismet.Companion/dateToGmt/#java.time.LocalDateTime/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html +$dokka.location:net.thauvin.erik.akismet/Akismet.Companion/dateToGmt/#java.util.Date/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html +$dokka.location:net.thauvin.erik.akismet/Akismet.Companion/jsonComment/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html +$dokka.location:net.thauvin.erik.akismet/Akismet///PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/index.html +$dokka.location:net.thauvin.erik.akismet/Akismet/Akismet/#kotlin.String#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/-akismet.html +$dokka.location:net.thauvin.erik.akismet/Akismet/Akismet/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/-akismet.html +$dokka.location:net.thauvin.erik.akismet/Akismet/appUserAgent/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/app-user-agent.html +$dokka.location:net.thauvin.erik.akismet/Akismet/blog/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/blog.html +$dokka.location:net.thauvin.erik.akismet/Akismet/checkComment/#net.thauvin.erik.akismet.AkismetComment#kotlin.Boolean/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/check-comment.html +$dokka.location:net.thauvin.erik.akismet/Akismet/debugHelp/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/debug-help.html +$dokka.location:net.thauvin.erik.akismet/Akismet/errorMessage/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/error-message.html +$dokka.location:net.thauvin.erik.akismet/Akismet/executeMethod/#[Error type: Unresolved type for HttpUrl]#[Error type: Unresolved type for FormBody]#kotlin.Boolean/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/execute-method.html +$dokka.location:net.thauvin.erik.akismet/Akismet/httpStatusCode/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/http-status-code.html +$dokka.location:net.thauvin.erik.akismet/Akismet/isDiscard/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/is-discard.html +$dokka.location:net.thauvin.erik.akismet/Akismet/isVerifiedKey/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/is-verified-key.html +$dokka.location:net.thauvin.erik.akismet/Akismet/logger/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/logger.html +$dokka.location:net.thauvin.erik.akismet/Akismet/proTip/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/pro-tip.html +$dokka.location:net.thauvin.erik.akismet/Akismet/reset/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/reset.html +$dokka.location:net.thauvin.erik.akismet/Akismet/response/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/response.html +$dokka.location:net.thauvin.erik.akismet/Akismet/submitHam/#net.thauvin.erik.akismet.AkismetComment/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/submit-ham.html +$dokka.location:net.thauvin.erik.akismet/Akismet/submitSpam/#net.thauvin.erik.akismet.AkismetComment/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/submit-spam.html +$dokka.location:net.thauvin.erik.akismet/Akismet/verifyKey/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet/verify-key.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion///PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment.Companion/ADMIN_ROLE/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment///PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/index.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/AkismetComment/#[Error type: Unresolved type for HttpServletRequest]/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/AkismetComment/#kotlin.String#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/AkismetComment/#net.thauvin.erik.akismet.CommentConfig/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/author/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/author.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/authorEmail/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/author-email.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/authorUrl/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/author-url.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/blogCharset/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/blogLang/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/content/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/content.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/dateGmt/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/equals/#kotlin.Any?/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/equals.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/hashCode/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/hash-code.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/isTest/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/is-test.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/permalink/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/permalink.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/postModifiedGmt/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/recheckReason/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/referrer/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/referrer.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/serverEnv/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/server-env.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/toJson/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/to-json.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/toString/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/to-string.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/type/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/type.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/userAgent/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/user-agent.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/userIp/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/user-ip.html +$dokka.location:net.thauvin.erik.akismet/AkismetComment/userRole/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-akismet-comment/user-role.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder///PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/index.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/Builder/#kotlin.String#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/-builder.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/author/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/author.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/author/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/author.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/authorEmail/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/authorEmail/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/authorUrl/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/authorUrl/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/blogCharset/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/blogCharset/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/blogLang/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/blogLang/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/build/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/build.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/content/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/content.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/content/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/content.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/dateGmt/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/dateGmt/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/isTest/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/isTest/#kotlin.Boolean/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/permalink/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/permalink/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/postModifiedGmt/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/postModifiedGmt/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/recheckReason/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/recheckReason/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/referrer/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/referrer/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/serverEnv/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/serverEnv/#kotlin.collections.Map[kotlin.String,kotlin.String]/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/type/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/type.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/type/#net.thauvin.erik.akismet.CommentType/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/type.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userAgent/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userAgent/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userIp/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userIp/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userRole/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig.Builder/userRole/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig///PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/index.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/CommentConfig/#kotlin.String#kotlin.String#kotlin.String#kotlin.String#net.thauvin.erik.akismet.CommentType#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.String#kotlin.Boolean#kotlin.String#kotlin.collections.Map[kotlin.String,kotlin.String]/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-comment-config.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/CommentConfig/#net.thauvin.erik.akismet.CommentConfig.Builder/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/-comment-config.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/author/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/author.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/authorEmail/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/author-email.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/authorUrl/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/author-url.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/blogCharset/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/blog-charset.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/blogLang/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/blog-lang.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/content/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/content.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/dateGmt/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/date-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/isTest/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/is-test.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/permalink/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/permalink.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/postModifiedGmt/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/post-modified-gmt.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/recheckReason/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/recheck-reason.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/referrer/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/referrer.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/serverEnv/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/server-env.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/type/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/type.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/userAgent/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/user-agent.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/userIp/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/user-ip.html +$dokka.location:net.thauvin.erik.akismet/CommentConfig/userRole/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-config/user-role.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion///PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/index.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/BLOG_POST/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-b-l-o-g_-p-o-s-t.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/COMMENT/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-m-m-e-n-t.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/CONTACT_FORM/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-n-t-a-c-t_-f-o-r-m.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/FORUM_POST/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-f-o-r-u-m_-p-o-s-t.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/MESSAGE/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-m-e-s-s-a-g-e.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/NONE/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-n-o-n-e.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/PINGBACK/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-p-i-n-g-b-a-c-k.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/REPLY/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-r-e-p-l-y.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/SIGNUP/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-s-i-g-n-u-p.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/TRACKBACK/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-t-r-a-c-k-b-a-c-k.html +$dokka.location:net.thauvin.erik.akismet/CommentType.Companion/TWEET/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-companion/-t-w-e-e-t.html +$dokka.location:net.thauvin.erik.akismet/CommentType///PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/index.html +$dokka.location:net.thauvin.erik.akismet/CommentType/CommentType/#kotlin.String/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/-comment-type.html +$dokka.location:net.thauvin.erik.akismet/CommentType/value/#/PointingToDeclaration/root/net.thauvin.erik.akismet/-comment-type/value.html +net.thauvin.erik.akismet + diff --git a/docs/scripts/clipboard.js b/docs/scripts/clipboard.js index b00ce24..7a4f33c 100644 --- a/docs/scripts/clipboard.js +++ b/docs/scripts/clipboard.js @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + window.addEventListener('load', () => { document.querySelectorAll('span.copy-icon').forEach(element => { element.addEventListener('click', (el) => copyElementsContentToClipboard(element)); diff --git a/docs/scripts/navigation-loader.js b/docs/scripts/navigation-loader.js index 9246491..3df7ac8 100644 --- a/docs/scripts/navigation-loader.js +++ b/docs/scripts/navigation-loader.js @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + navigationPageText = fetch(pathToRoot + "navigation.html").then(response => response.text()) displayNavigationFromPage = () => { diff --git a/docs/scripts/pages.json b/docs/scripts/pages.json index 1b911f5..e3e92d4 100644 --- a/docs/scripts/pages.json +++ b/docs/scripts/pages.json @@ -1 +1 @@ -[{"name":"const val ADMIN_ROLE: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.ADMIN_ROLE","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html","searchKeys":["ADMIN_ROLE","const val ADMIN_ROLE: String","net.thauvin.erik.akismet.AkismetComment.Companion.ADMIN_ROLE"]},{"name":"const val TYPE_BLOG_POST: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_BLOG_POST","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-b-l-o-g_-p-o-s-t.html","searchKeys":["TYPE_BLOG_POST","const val TYPE_BLOG_POST: String","net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_BLOG_POST"]},{"name":"const val TYPE_COMMENT: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_COMMENT","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-m-m-e-n-t.html","searchKeys":["TYPE_COMMENT","const val TYPE_COMMENT: String","net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_COMMENT"]},{"name":"const val TYPE_CONTACT_FORM: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_CONTACT_FORM","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-c-o-n-t-a-c-t_-f-o-r-m.html","searchKeys":["TYPE_CONTACT_FORM","const val TYPE_CONTACT_FORM: String","net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_CONTACT_FORM"]},{"name":"const val TYPE_FORUM_POST: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_FORUM_POST","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-f-o-r-u-m_-p-o-s-t.html","searchKeys":["TYPE_FORUM_POST","const val TYPE_FORUM_POST: String","net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_FORUM_POST"]},{"name":"const val TYPE_MESSAGE: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_MESSAGE","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-m-e-s-s-a-g-e.html","searchKeys":["TYPE_MESSAGE","const val TYPE_MESSAGE: String","net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_MESSAGE"]},{"name":"const val TYPE_PINGBACK: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_PINGBACK","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-p-i-n-g-b-a-c-k.html","searchKeys":["TYPE_PINGBACK","const val TYPE_PINGBACK: String","net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_PINGBACK"]},{"name":"const val TYPE_REPLY: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_REPLY","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-r-e-p-l-y.html","searchKeys":["TYPE_REPLY","const val TYPE_REPLY: String","net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_REPLY"]},{"name":"const val TYPE_SIGNUP: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_SIGNUP","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-s-i-g-n-u-p.html","searchKeys":["TYPE_SIGNUP","const val TYPE_SIGNUP: String","net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_SIGNUP"]},{"name":"const val TYPE_TRACKBACK: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_TRACKBACK","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-r-a-c-k-b-a-c-k.html","searchKeys":["TYPE_TRACKBACK","const val TYPE_TRACKBACK: String","net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_TRACKBACK"]},{"name":"const val TYPE_TWEET: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_TWEET","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-t-y-p-e_-t-w-e-e-t.html","searchKeys":["TYPE_TWEET","const val TYPE_TWEET: String","net.thauvin.erik.akismet.AkismetComment.Companion.TYPE_TWEET"]},{"name":"constructor(apiKey: String)","description":"net.thauvin.erik.akismet.Akismet.Akismet","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html","searchKeys":["Akismet","constructor(apiKey: String)","net.thauvin.erik.akismet.Akismet.Akismet"]},{"name":"constructor(apiKey: String, blog: String)","description":"net.thauvin.erik.akismet.Akismet.Akismet","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html","searchKeys":["Akismet","constructor(apiKey: String, blog: String)","net.thauvin.erik.akismet.Akismet.Akismet"]},{"name":"constructor(request: HttpServletRequest)","description":"net.thauvin.erik.akismet.AkismetComment.AkismetComment","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html","searchKeys":["AkismetComment","constructor(request: HttpServletRequest)","net.thauvin.erik.akismet.AkismetComment.AkismetComment"]},{"name":"constructor(userIp: String, userAgent: String)","description":"net.thauvin.erik.akismet.AkismetComment.AkismetComment","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html","searchKeys":["AkismetComment","constructor(userIp: String, userAgent: String)","net.thauvin.erik.akismet.AkismetComment.AkismetComment"]},{"name":"fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean","description":"net.thauvin.erik.akismet.Akismet.checkComment","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html","searchKeys":["checkComment","fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean","net.thauvin.erik.akismet.Akismet.checkComment"]},{"name":"fun dateToGmt(date: Date): String","description":"net.thauvin.erik.akismet.Akismet.Companion.dateToGmt","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html","searchKeys":["dateToGmt","fun dateToGmt(date: Date): String","net.thauvin.erik.akismet.Akismet.Companion.dateToGmt"]},{"name":"fun dateToGmt(date: LocalDateTime): String","description":"net.thauvin.erik.akismet.Akismet.Companion.dateToGmt","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html","searchKeys":["dateToGmt","fun dateToGmt(date: LocalDateTime): String","net.thauvin.erik.akismet.Akismet.Companion.dateToGmt"]},{"name":"fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean","description":"net.thauvin.erik.akismet.Akismet.executeMethod","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html","searchKeys":["executeMethod","fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean","net.thauvin.erik.akismet.Akismet.executeMethod"]},{"name":"fun jsonComment(json: String): AkismetComment","description":"net.thauvin.erik.akismet.Akismet.Companion.jsonComment","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html","searchKeys":["jsonComment","fun jsonComment(json: String): AkismetComment","net.thauvin.erik.akismet.Akismet.Companion.jsonComment"]},{"name":"fun reset()","description":"net.thauvin.erik.akismet.Akismet.reset","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/reset.html","searchKeys":["reset","fun reset()","net.thauvin.erik.akismet.Akismet.reset"]},{"name":"fun submitHam(comment: AkismetComment): Boolean","description":"net.thauvin.erik.akismet.Akismet.submitHam","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html","searchKeys":["submitHam","fun submitHam(comment: AkismetComment): Boolean","net.thauvin.erik.akismet.Akismet.submitHam"]},{"name":"fun submitSpam(comment: AkismetComment): Boolean","description":"net.thauvin.erik.akismet.Akismet.submitSpam","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html","searchKeys":["submitSpam","fun submitSpam(comment: AkismetComment): Boolean","net.thauvin.erik.akismet.Akismet.submitSpam"]},{"name":"fun toJson(): String","description":"net.thauvin.erik.akismet.AkismetComment.toJson","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html","searchKeys":["toJson","fun toJson(): String","net.thauvin.erik.akismet.AkismetComment.toJson"]},{"name":"fun verifyKey(): Boolean","description":"net.thauvin.erik.akismet.Akismet.verifyKey","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html","searchKeys":["verifyKey","fun verifyKey(): Boolean","net.thauvin.erik.akismet.Akismet.verifyKey"]},{"name":"object Companion","description":"net.thauvin.erik.akismet.Akismet.Companion","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html","searchKeys":["Companion","object Companion","net.thauvin.erik.akismet.Akismet.Companion"]},{"name":"object Companion","description":"net.thauvin.erik.akismet.AkismetComment.Companion","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html","searchKeys":["Companion","object Companion","net.thauvin.erik.akismet.AkismetComment.Companion"]},{"name":"open class Akismet(apiKey: String)","description":"net.thauvin.erik.akismet.Akismet","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/index.html","searchKeys":["Akismet","open class Akismet(apiKey: String)","net.thauvin.erik.akismet.Akismet"]},{"name":"open class AkismetComment(val userIp: String, val userAgent: String)","description":"net.thauvin.erik.akismet.AkismetComment","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html","searchKeys":["AkismetComment","open class AkismetComment(val userIp: String, val userAgent: String)","net.thauvin.erik.akismet.AkismetComment"]},{"name":"open operator override fun equals(other: Any?): Boolean","description":"net.thauvin.erik.akismet.AkismetComment.equals","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html","searchKeys":["equals","open operator override fun equals(other: Any?): Boolean","net.thauvin.erik.akismet.AkismetComment.equals"]},{"name":"open override fun hashCode(): Int","description":"net.thauvin.erik.akismet.AkismetComment.hashCode","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html","searchKeys":["hashCode","open override fun hashCode(): Int","net.thauvin.erik.akismet.AkismetComment.hashCode"]},{"name":"open override fun toString(): String","description":"net.thauvin.erik.akismet.AkismetComment.toString","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html","searchKeys":["toString","open override fun toString(): String","net.thauvin.erik.akismet.AkismetComment.toString"]},{"name":"val logger: Logger","description":"net.thauvin.erik.akismet.Akismet.logger","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/logger.html","searchKeys":["logger","val logger: Logger","net.thauvin.erik.akismet.Akismet.logger"]},{"name":"val userAgent: String","description":"net.thauvin.erik.akismet.AkismetComment.userAgent","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html","searchKeys":["userAgent","val userAgent: String","net.thauvin.erik.akismet.AkismetComment.userAgent"]},{"name":"val userIp: String","description":"net.thauvin.erik.akismet.AkismetComment.userIp","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html","searchKeys":["userIp","val userIp: String","net.thauvin.erik.akismet.AkismetComment.userIp"]},{"name":"var appUserAgent: String","description":"net.thauvin.erik.akismet.Akismet.appUserAgent","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html","searchKeys":["appUserAgent","var appUserAgent: String","net.thauvin.erik.akismet.Akismet.appUserAgent"]},{"name":"var author: String?","description":"net.thauvin.erik.akismet.AkismetComment.author","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html","searchKeys":["author","var author: String?","net.thauvin.erik.akismet.AkismetComment.author"]},{"name":"var authorEmail: String?","description":"net.thauvin.erik.akismet.AkismetComment.authorEmail","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html","searchKeys":["authorEmail","var authorEmail: String?","net.thauvin.erik.akismet.AkismetComment.authorEmail"]},{"name":"var authorUrl: String?","description":"net.thauvin.erik.akismet.AkismetComment.authorUrl","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html","searchKeys":["authorUrl","var authorUrl: String?","net.thauvin.erik.akismet.AkismetComment.authorUrl"]},{"name":"var blog: String","description":"net.thauvin.erik.akismet.Akismet.blog","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/blog.html","searchKeys":["blog","var blog: String","net.thauvin.erik.akismet.Akismet.blog"]},{"name":"var blogCharset: String?","description":"net.thauvin.erik.akismet.AkismetComment.blogCharset","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html","searchKeys":["blogCharset","var blogCharset: String?","net.thauvin.erik.akismet.AkismetComment.blogCharset"]},{"name":"var blogLang: String?","description":"net.thauvin.erik.akismet.AkismetComment.blogLang","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html","searchKeys":["blogLang","var blogLang: String?","net.thauvin.erik.akismet.AkismetComment.blogLang"]},{"name":"var content: String?","description":"net.thauvin.erik.akismet.AkismetComment.content","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html","searchKeys":["content","var content: String?","net.thauvin.erik.akismet.AkismetComment.content"]},{"name":"var dateGmt: String?","description":"net.thauvin.erik.akismet.AkismetComment.dateGmt","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html","searchKeys":["dateGmt","var dateGmt: String?","net.thauvin.erik.akismet.AkismetComment.dateGmt"]},{"name":"var debugHelp: String","description":"net.thauvin.erik.akismet.Akismet.debugHelp","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html","searchKeys":["debugHelp","var debugHelp: String","net.thauvin.erik.akismet.Akismet.debugHelp"]},{"name":"var errorMessage: String","description":"net.thauvin.erik.akismet.Akismet.errorMessage","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/error-message.html","searchKeys":["errorMessage","var errorMessage: String","net.thauvin.erik.akismet.Akismet.errorMessage"]},{"name":"var httpStatusCode: Int","description":"net.thauvin.erik.akismet.Akismet.httpStatusCode","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html","searchKeys":["httpStatusCode","var httpStatusCode: Int","net.thauvin.erik.akismet.Akismet.httpStatusCode"]},{"name":"var isDiscard: Boolean","description":"net.thauvin.erik.akismet.Akismet.isDiscard","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html","searchKeys":["isDiscard","var isDiscard: Boolean","net.thauvin.erik.akismet.Akismet.isDiscard"]},{"name":"var isTest: Boolean","description":"net.thauvin.erik.akismet.AkismetComment.isTest","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html","searchKeys":["isTest","var isTest: Boolean","net.thauvin.erik.akismet.AkismetComment.isTest"]},{"name":"var isVerifiedKey: Boolean","description":"net.thauvin.erik.akismet.Akismet.isVerifiedKey","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html","searchKeys":["isVerifiedKey","var isVerifiedKey: Boolean","net.thauvin.erik.akismet.Akismet.isVerifiedKey"]},{"name":"var permalink: String?","description":"net.thauvin.erik.akismet.AkismetComment.permalink","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html","searchKeys":["permalink","var permalink: String?","net.thauvin.erik.akismet.AkismetComment.permalink"]},{"name":"var postModifiedGmt: String?","description":"net.thauvin.erik.akismet.AkismetComment.postModifiedGmt","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html","searchKeys":["postModifiedGmt","var postModifiedGmt: String?","net.thauvin.erik.akismet.AkismetComment.postModifiedGmt"]},{"name":"var proTip: String","description":"net.thauvin.erik.akismet.Akismet.proTip","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html","searchKeys":["proTip","var proTip: String","net.thauvin.erik.akismet.Akismet.proTip"]},{"name":"var recheckReason: String?","description":"net.thauvin.erik.akismet.AkismetComment.recheckReason","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html","searchKeys":["recheckReason","var recheckReason: String?","net.thauvin.erik.akismet.AkismetComment.recheckReason"]},{"name":"var referrer: String?","description":"net.thauvin.erik.akismet.AkismetComment.referrer","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html","searchKeys":["referrer","var referrer: String?","net.thauvin.erik.akismet.AkismetComment.referrer"]},{"name":"var response: String","description":"net.thauvin.erik.akismet.Akismet.response","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet/response.html","searchKeys":["response","var response: String","net.thauvin.erik.akismet.Akismet.response"]},{"name":"var serverEnv: Map","description":"net.thauvin.erik.akismet.AkismetComment.serverEnv","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html","searchKeys":["serverEnv","var serverEnv: Map","net.thauvin.erik.akismet.AkismetComment.serverEnv"]},{"name":"var type: String?","description":"net.thauvin.erik.akismet.AkismetComment.type","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html","searchKeys":["type","var type: String?","net.thauvin.erik.akismet.AkismetComment.type"]},{"name":"var userRole: String?","description":"net.thauvin.erik.akismet.AkismetComment.userRole","location":"akismet-kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html","searchKeys":["userRole","var userRole: String?","net.thauvin.erik.akismet.AkismetComment.userRole"]}] +[{"name":"class CommentConfig constructor(var userIp: String, var userAgent: String, var referrer: String = \"\", var permalink: String = \"\", var type: CommentType = CommentType.NONE, var author: String = \"\", var authorEmail: String = \"\", var authorUrl: String = \"\", var content: String = \"\", var dateGmt: String = \"\", var postModifiedGmt: String = \"\", var blogLang: String = \"\", var blogCharset: String = \"\", var userRole: String = \"\", var isTest: Boolean = false, var recheckReason: String = \"\", var serverEnv: Map = emptyMap())","description":"net.thauvin.erik.akismet.CommentConfig","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/index.html","searchKeys":["CommentConfig","class CommentConfig constructor(var userIp: String, var userAgent: String, var referrer: String = \"\", var permalink: String = \"\", var type: CommentType = CommentType.NONE, var author: String = \"\", var authorEmail: String = \"\", var authorUrl: String = \"\", var content: String = \"\", var dateGmt: String = \"\", var postModifiedGmt: String = \"\", var blogLang: String = \"\", var blogCharset: String = \"\", var userRole: String = \"\", var isTest: Boolean = false, var recheckReason: String = \"\", var serverEnv: Map = emptyMap())","net.thauvin.erik.akismet.CommentConfig"]},{"name":"const val ADMIN_ROLE: String","description":"net.thauvin.erik.akismet.AkismetComment.Companion.ADMIN_ROLE","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/-a-d-m-i-n_-r-o-l-e.html","searchKeys":["ADMIN_ROLE","const val ADMIN_ROLE: String","net.thauvin.erik.akismet.AkismetComment.Companion.ADMIN_ROLE"]},{"name":"constructor(apiKey: String)","description":"net.thauvin.erik.akismet.Akismet.Akismet","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html","searchKeys":["Akismet","constructor(apiKey: String)","net.thauvin.erik.akismet.Akismet.Akismet"]},{"name":"constructor(apiKey: String, blog: String)","description":"net.thauvin.erik.akismet.Akismet.Akismet","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-akismet.html","searchKeys":["Akismet","constructor(apiKey: String, blog: String)","net.thauvin.erik.akismet.Akismet.Akismet"]},{"name":"constructor(builder: CommentConfig.Builder)","description":"net.thauvin.erik.akismet.CommentConfig.CommentConfig","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-comment-config.html","searchKeys":["CommentConfig","constructor(builder: CommentConfig.Builder)","net.thauvin.erik.akismet.CommentConfig.CommentConfig"]},{"name":"constructor(config: CommentConfig)","description":"net.thauvin.erik.akismet.AkismetComment.AkismetComment","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html","searchKeys":["AkismetComment","constructor(config: CommentConfig)","net.thauvin.erik.akismet.AkismetComment.AkismetComment"]},{"name":"constructor(request: HttpServletRequest)","description":"net.thauvin.erik.akismet.AkismetComment.AkismetComment","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html","searchKeys":["AkismetComment","constructor(request: HttpServletRequest)","net.thauvin.erik.akismet.AkismetComment.AkismetComment"]},{"name":"constructor(userIp: String, userAgent: String)","description":"net.thauvin.erik.akismet.AkismetComment.AkismetComment","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-akismet-comment.html","searchKeys":["AkismetComment","constructor(userIp: String, userAgent: String)","net.thauvin.erik.akismet.AkismetComment.AkismetComment"]},{"name":"constructor(userIp: String, userAgent: String)","description":"net.thauvin.erik.akismet.CommentConfig.Builder.Builder","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/-builder.html","searchKeys":["Builder","constructor(userIp: String, userAgent: String)","net.thauvin.erik.akismet.CommentConfig.Builder.Builder"]},{"name":"constructor(userIp: String, userAgent: String, referrer: String = \"\", permalink: String = \"\", type: CommentType = CommentType.NONE, author: String = \"\", authorEmail: String = \"\", authorUrl: String = \"\", content: String = \"\", dateGmt: String = \"\", postModifiedGmt: String = \"\", blogLang: String = \"\", blogCharset: String = \"\", userRole: String = \"\", isTest: Boolean = false, recheckReason: String = \"\", serverEnv: Map = emptyMap())","description":"net.thauvin.erik.akismet.CommentConfig.CommentConfig","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-comment-config.html","searchKeys":["CommentConfig","constructor(userIp: String, userAgent: String, referrer: String = \"\", permalink: String = \"\", type: CommentType = CommentType.NONE, author: String = \"\", authorEmail: String = \"\", authorUrl: String = \"\", content: String = \"\", dateGmt: String = \"\", postModifiedGmt: String = \"\", blogLang: String = \"\", blogCharset: String = \"\", userRole: String = \"\", isTest: Boolean = false, recheckReason: String = \"\", serverEnv: Map = emptyMap())","net.thauvin.erik.akismet.CommentConfig.CommentConfig"]},{"name":"constructor(value: String)","description":"net.thauvin.erik.akismet.CommentType.CommentType","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-comment-type.html","searchKeys":["CommentType","constructor(value: String)","net.thauvin.erik.akismet.CommentType.CommentType"]},{"name":"data class Builder(var userIp: String, var userAgent: String)","description":"net.thauvin.erik.akismet.CommentConfig.Builder","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/index.html","searchKeys":["Builder","data class Builder(var userIp: String, var userAgent: String)","net.thauvin.erik.akismet.CommentConfig.Builder"]},{"name":"data class CommentType(var value: String)","description":"net.thauvin.erik.akismet.CommentType","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/index.html","searchKeys":["CommentType","data class CommentType(var value: String)","net.thauvin.erik.akismet.CommentType"]},{"name":"fun author(author: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.author","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author.html","searchKeys":["author","fun author(author: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.author"]},{"name":"fun authorEmail(authorEmail: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.authorEmail","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html","searchKeys":["authorEmail","fun authorEmail(authorEmail: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.authorEmail"]},{"name":"fun authorUrl(authorUrl: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.authorUrl","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html","searchKeys":["authorUrl","fun authorUrl(authorUrl: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.authorUrl"]},{"name":"fun blogCharset(blogCharset: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.blogCharset","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html","searchKeys":["blogCharset","fun blogCharset(blogCharset: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.blogCharset"]},{"name":"fun blogLang(blogLang: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.blogLang","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html","searchKeys":["blogLang","fun blogLang(blogLang: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.blogLang"]},{"name":"fun build(): CommentConfig","description":"net.thauvin.erik.akismet.CommentConfig.Builder.build","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/build.html","searchKeys":["build","fun build(): CommentConfig","net.thauvin.erik.akismet.CommentConfig.Builder.build"]},{"name":"fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean","description":"net.thauvin.erik.akismet.Akismet.checkComment","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/check-comment.html","searchKeys":["checkComment","fun checkComment(comment: AkismetComment, trueOnError: Boolean = false): Boolean","net.thauvin.erik.akismet.Akismet.checkComment"]},{"name":"fun content(content: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.content","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/content.html","searchKeys":["content","fun content(content: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.content"]},{"name":"fun dateGmt(dateGmt: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.dateGmt","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html","searchKeys":["dateGmt","fun dateGmt(dateGmt: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.dateGmt"]},{"name":"fun dateToGmt(date: Date): String","description":"net.thauvin.erik.akismet.Akismet.Companion.dateToGmt","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html","searchKeys":["dateToGmt","fun dateToGmt(date: Date): String","net.thauvin.erik.akismet.Akismet.Companion.dateToGmt"]},{"name":"fun dateToGmt(date: LocalDateTime): String","description":"net.thauvin.erik.akismet.Akismet.Companion.dateToGmt","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/date-to-gmt.html","searchKeys":["dateToGmt","fun dateToGmt(date: LocalDateTime): String","net.thauvin.erik.akismet.Akismet.Companion.dateToGmt"]},{"name":"fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean","description":"net.thauvin.erik.akismet.Akismet.executeMethod","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/execute-method.html","searchKeys":["executeMethod","fun executeMethod(apiUrl: HttpUrl, formBody: FormBody, trueOnError: Boolean = false): Boolean","net.thauvin.erik.akismet.Akismet.executeMethod"]},{"name":"fun isTest(isTest: Boolean): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.isTest","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html","searchKeys":["isTest","fun isTest(isTest: Boolean): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.isTest"]},{"name":"fun jsonComment(json: String): AkismetComment","description":"net.thauvin.erik.akismet.Akismet.Companion.jsonComment","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/json-comment.html","searchKeys":["jsonComment","fun jsonComment(json: String): AkismetComment","net.thauvin.erik.akismet.Akismet.Companion.jsonComment"]},{"name":"fun permalink(permalink: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.permalink","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html","searchKeys":["permalink","fun permalink(permalink: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.permalink"]},{"name":"fun postModifiedGmt(postModifiedGmt: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.postModifiedGmt","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html","searchKeys":["postModifiedGmt","fun postModifiedGmt(postModifiedGmt: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.postModifiedGmt"]},{"name":"fun recheckReason(checkReason: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.recheckReason","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html","searchKeys":["recheckReason","fun recheckReason(checkReason: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.recheckReason"]},{"name":"fun referrer(referrer: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.referrer","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html","searchKeys":["referrer","fun referrer(referrer: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.referrer"]},{"name":"fun reset()","description":"net.thauvin.erik.akismet.Akismet.reset","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/reset.html","searchKeys":["reset","fun reset()","net.thauvin.erik.akismet.Akismet.reset"]},{"name":"fun serverEnv(serverEnv: Map): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.serverEnv","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html","searchKeys":["serverEnv","fun serverEnv(serverEnv: Map): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.serverEnv"]},{"name":"fun submitHam(comment: AkismetComment): Boolean","description":"net.thauvin.erik.akismet.Akismet.submitHam","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/submit-ham.html","searchKeys":["submitHam","fun submitHam(comment: AkismetComment): Boolean","net.thauvin.erik.akismet.Akismet.submitHam"]},{"name":"fun submitSpam(comment: AkismetComment): Boolean","description":"net.thauvin.erik.akismet.Akismet.submitSpam","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/submit-spam.html","searchKeys":["submitSpam","fun submitSpam(comment: AkismetComment): Boolean","net.thauvin.erik.akismet.Akismet.submitSpam"]},{"name":"fun toJson(): String","description":"net.thauvin.erik.akismet.AkismetComment.toJson","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/to-json.html","searchKeys":["toJson","fun toJson(): String","net.thauvin.erik.akismet.AkismetComment.toJson"]},{"name":"fun type(type: CommentType): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.type","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/type.html","searchKeys":["type","fun type(type: CommentType): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.type"]},{"name":"fun userAgent(userAgent: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.userAgent","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html","searchKeys":["userAgent","fun userAgent(userAgent: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.userAgent"]},{"name":"fun userIp(userIp: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.userIp","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html","searchKeys":["userIp","fun userIp(userIp: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.userIp"]},{"name":"fun userRole(userRole: String): CommentConfig.Builder","description":"net.thauvin.erik.akismet.CommentConfig.Builder.userRole","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html","searchKeys":["userRole","fun userRole(userRole: String): CommentConfig.Builder","net.thauvin.erik.akismet.CommentConfig.Builder.userRole"]},{"name":"fun verifyKey(): Boolean","description":"net.thauvin.erik.akismet.Akismet.verifyKey","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/verify-key.html","searchKeys":["verifyKey","fun verifyKey(): Boolean","net.thauvin.erik.akismet.Akismet.verifyKey"]},{"name":"object Companion","description":"net.thauvin.erik.akismet.Akismet.Companion","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/-companion/index.html","searchKeys":["Companion","object Companion","net.thauvin.erik.akismet.Akismet.Companion"]},{"name":"object Companion","description":"net.thauvin.erik.akismet.AkismetComment.Companion","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/-companion/index.html","searchKeys":["Companion","object Companion","net.thauvin.erik.akismet.AkismetComment.Companion"]},{"name":"object Companion","description":"net.thauvin.erik.akismet.CommentType.Companion","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/index.html","searchKeys":["Companion","object Companion","net.thauvin.erik.akismet.CommentType.Companion"]},{"name":"open class Akismet(apiKey: String)","description":"net.thauvin.erik.akismet.Akismet","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/index.html","searchKeys":["Akismet","open class Akismet(apiKey: String)","net.thauvin.erik.akismet.Akismet"]},{"name":"open class AkismetComment(val userIp: String, val userAgent: String)","description":"net.thauvin.erik.akismet.AkismetComment","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/index.html","searchKeys":["AkismetComment","open class AkismetComment(val userIp: String, val userAgent: String)","net.thauvin.erik.akismet.AkismetComment"]},{"name":"open operator override fun equals(other: Any?): Boolean","description":"net.thauvin.erik.akismet.AkismetComment.equals","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/equals.html","searchKeys":["equals","open operator override fun equals(other: Any?): Boolean","net.thauvin.erik.akismet.AkismetComment.equals"]},{"name":"open override fun hashCode(): Int","description":"net.thauvin.erik.akismet.AkismetComment.hashCode","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/hash-code.html","searchKeys":["hashCode","open override fun hashCode(): Int","net.thauvin.erik.akismet.AkismetComment.hashCode"]},{"name":"open override fun toString(): String","description":"net.thauvin.erik.akismet.AkismetComment.toString","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/to-string.html","searchKeys":["toString","open override fun toString(): String","net.thauvin.erik.akismet.AkismetComment.toString"]},{"name":"val BLOG_POST: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.BLOG_POST","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-b-l-o-g_-p-o-s-t.html","searchKeys":["BLOG_POST","val BLOG_POST: CommentType","net.thauvin.erik.akismet.CommentType.Companion.BLOG_POST"]},{"name":"val COMMENT: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.COMMENT","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-m-m-e-n-t.html","searchKeys":["COMMENT","val COMMENT: CommentType","net.thauvin.erik.akismet.CommentType.Companion.COMMENT"]},{"name":"val CONTACT_FORM: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.CONTACT_FORM","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-c-o-n-t-a-c-t_-f-o-r-m.html","searchKeys":["CONTACT_FORM","val CONTACT_FORM: CommentType","net.thauvin.erik.akismet.CommentType.Companion.CONTACT_FORM"]},{"name":"val FORUM_POST: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.FORUM_POST","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-f-o-r-u-m_-p-o-s-t.html","searchKeys":["FORUM_POST","val FORUM_POST: CommentType","net.thauvin.erik.akismet.CommentType.Companion.FORUM_POST"]},{"name":"val MESSAGE: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.MESSAGE","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-m-e-s-s-a-g-e.html","searchKeys":["MESSAGE","val MESSAGE: CommentType","net.thauvin.erik.akismet.CommentType.Companion.MESSAGE"]},{"name":"val NONE: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.NONE","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-n-o-n-e.html","searchKeys":["NONE","val NONE: CommentType","net.thauvin.erik.akismet.CommentType.Companion.NONE"]},{"name":"val PINGBACK: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.PINGBACK","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-p-i-n-g-b-a-c-k.html","searchKeys":["PINGBACK","val PINGBACK: CommentType","net.thauvin.erik.akismet.CommentType.Companion.PINGBACK"]},{"name":"val REPLY: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.REPLY","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-r-e-p-l-y.html","searchKeys":["REPLY","val REPLY: CommentType","net.thauvin.erik.akismet.CommentType.Companion.REPLY"]},{"name":"val SIGNUP: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.SIGNUP","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-s-i-g-n-u-p.html","searchKeys":["SIGNUP","val SIGNUP: CommentType","net.thauvin.erik.akismet.CommentType.Companion.SIGNUP"]},{"name":"val TRACKBACK: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.TRACKBACK","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-t-r-a-c-k-b-a-c-k.html","searchKeys":["TRACKBACK","val TRACKBACK: CommentType","net.thauvin.erik.akismet.CommentType.Companion.TRACKBACK"]},{"name":"val TWEET: CommentType","description":"net.thauvin.erik.akismet.CommentType.Companion.TWEET","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/-companion/-t-w-e-e-t.html","searchKeys":["TWEET","val TWEET: CommentType","net.thauvin.erik.akismet.CommentType.Companion.TWEET"]},{"name":"val logger: Logger","description":"net.thauvin.erik.akismet.Akismet.logger","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/logger.html","searchKeys":["logger","val logger: Logger","net.thauvin.erik.akismet.Akismet.logger"]},{"name":"val userAgent: String","description":"net.thauvin.erik.akismet.AkismetComment.userAgent","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-agent.html","searchKeys":["userAgent","val userAgent: String","net.thauvin.erik.akismet.AkismetComment.userAgent"]},{"name":"val userIp: String","description":"net.thauvin.erik.akismet.AkismetComment.userIp","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-ip.html","searchKeys":["userIp","val userIp: String","net.thauvin.erik.akismet.AkismetComment.userIp"]},{"name":"var appUserAgent: String","description":"net.thauvin.erik.akismet.Akismet.appUserAgent","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/app-user-agent.html","searchKeys":["appUserAgent","var appUserAgent: String","net.thauvin.erik.akismet.Akismet.appUserAgent"]},{"name":"var author: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.author","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author.html","searchKeys":["author","var author: String","net.thauvin.erik.akismet.CommentConfig.Builder.author"]},{"name":"var author: String","description":"net.thauvin.erik.akismet.CommentConfig.author","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author.html","searchKeys":["author","var author: String","net.thauvin.erik.akismet.CommentConfig.author"]},{"name":"var author: String?","description":"net.thauvin.erik.akismet.AkismetComment.author","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author.html","searchKeys":["author","var author: String?","net.thauvin.erik.akismet.AkismetComment.author"]},{"name":"var authorEmail: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.authorEmail","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-email.html","searchKeys":["authorEmail","var authorEmail: String","net.thauvin.erik.akismet.CommentConfig.Builder.authorEmail"]},{"name":"var authorEmail: String","description":"net.thauvin.erik.akismet.CommentConfig.authorEmail","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author-email.html","searchKeys":["authorEmail","var authorEmail: String","net.thauvin.erik.akismet.CommentConfig.authorEmail"]},{"name":"var authorEmail: String?","description":"net.thauvin.erik.akismet.AkismetComment.authorEmail","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author-email.html","searchKeys":["authorEmail","var authorEmail: String?","net.thauvin.erik.akismet.AkismetComment.authorEmail"]},{"name":"var authorUrl: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.authorUrl","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/author-url.html","searchKeys":["authorUrl","var authorUrl: String","net.thauvin.erik.akismet.CommentConfig.Builder.authorUrl"]},{"name":"var authorUrl: String","description":"net.thauvin.erik.akismet.CommentConfig.authorUrl","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/author-url.html","searchKeys":["authorUrl","var authorUrl: String","net.thauvin.erik.akismet.CommentConfig.authorUrl"]},{"name":"var authorUrl: String?","description":"net.thauvin.erik.akismet.AkismetComment.authorUrl","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/author-url.html","searchKeys":["authorUrl","var authorUrl: String?","net.thauvin.erik.akismet.AkismetComment.authorUrl"]},{"name":"var blog: String","description":"net.thauvin.erik.akismet.Akismet.blog","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/blog.html","searchKeys":["blog","var blog: String","net.thauvin.erik.akismet.Akismet.blog"]},{"name":"var blogCharset: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.blogCharset","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-charset.html","searchKeys":["blogCharset","var blogCharset: String","net.thauvin.erik.akismet.CommentConfig.Builder.blogCharset"]},{"name":"var blogCharset: String","description":"net.thauvin.erik.akismet.CommentConfig.blogCharset","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/blog-charset.html","searchKeys":["blogCharset","var blogCharset: String","net.thauvin.erik.akismet.CommentConfig.blogCharset"]},{"name":"var blogCharset: String?","description":"net.thauvin.erik.akismet.AkismetComment.blogCharset","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-charset.html","searchKeys":["blogCharset","var blogCharset: String?","net.thauvin.erik.akismet.AkismetComment.blogCharset"]},{"name":"var blogLang: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.blogLang","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/blog-lang.html","searchKeys":["blogLang","var blogLang: String","net.thauvin.erik.akismet.CommentConfig.Builder.blogLang"]},{"name":"var blogLang: String","description":"net.thauvin.erik.akismet.CommentConfig.blogLang","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/blog-lang.html","searchKeys":["blogLang","var blogLang: String","net.thauvin.erik.akismet.CommentConfig.blogLang"]},{"name":"var blogLang: String?","description":"net.thauvin.erik.akismet.AkismetComment.blogLang","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/blog-lang.html","searchKeys":["blogLang","var blogLang: String?","net.thauvin.erik.akismet.AkismetComment.blogLang"]},{"name":"var content: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.content","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/content.html","searchKeys":["content","var content: String","net.thauvin.erik.akismet.CommentConfig.Builder.content"]},{"name":"var content: String","description":"net.thauvin.erik.akismet.CommentConfig.content","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/content.html","searchKeys":["content","var content: String","net.thauvin.erik.akismet.CommentConfig.content"]},{"name":"var content: String?","description":"net.thauvin.erik.akismet.AkismetComment.content","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/content.html","searchKeys":["content","var content: String?","net.thauvin.erik.akismet.AkismetComment.content"]},{"name":"var dateGmt: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.dateGmt","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/date-gmt.html","searchKeys":["dateGmt","var dateGmt: String","net.thauvin.erik.akismet.CommentConfig.Builder.dateGmt"]},{"name":"var dateGmt: String","description":"net.thauvin.erik.akismet.CommentConfig.dateGmt","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/date-gmt.html","searchKeys":["dateGmt","var dateGmt: String","net.thauvin.erik.akismet.CommentConfig.dateGmt"]},{"name":"var dateGmt: String?","description":"net.thauvin.erik.akismet.AkismetComment.dateGmt","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/date-gmt.html","searchKeys":["dateGmt","var dateGmt: String?","net.thauvin.erik.akismet.AkismetComment.dateGmt"]},{"name":"var debugHelp: String","description":"net.thauvin.erik.akismet.Akismet.debugHelp","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/debug-help.html","searchKeys":["debugHelp","var debugHelp: String","net.thauvin.erik.akismet.Akismet.debugHelp"]},{"name":"var errorMessage: String","description":"net.thauvin.erik.akismet.Akismet.errorMessage","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/error-message.html","searchKeys":["errorMessage","var errorMessage: String","net.thauvin.erik.akismet.Akismet.errorMessage"]},{"name":"var httpStatusCode: Int","description":"net.thauvin.erik.akismet.Akismet.httpStatusCode","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/http-status-code.html","searchKeys":["httpStatusCode","var httpStatusCode: Int","net.thauvin.erik.akismet.Akismet.httpStatusCode"]},{"name":"var isDiscard: Boolean","description":"net.thauvin.erik.akismet.Akismet.isDiscard","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/is-discard.html","searchKeys":["isDiscard","var isDiscard: Boolean","net.thauvin.erik.akismet.Akismet.isDiscard"]},{"name":"var isTest: Boolean","description":"net.thauvin.erik.akismet.AkismetComment.isTest","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/is-test.html","searchKeys":["isTest","var isTest: Boolean","net.thauvin.erik.akismet.AkismetComment.isTest"]},{"name":"var isTest: Boolean","description":"net.thauvin.erik.akismet.CommentConfig.Builder.isTest","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/is-test.html","searchKeys":["isTest","var isTest: Boolean","net.thauvin.erik.akismet.CommentConfig.Builder.isTest"]},{"name":"var isTest: Boolean","description":"net.thauvin.erik.akismet.CommentConfig.isTest","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/is-test.html","searchKeys":["isTest","var isTest: Boolean","net.thauvin.erik.akismet.CommentConfig.isTest"]},{"name":"var isVerifiedKey: Boolean","description":"net.thauvin.erik.akismet.Akismet.isVerifiedKey","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/is-verified-key.html","searchKeys":["isVerifiedKey","var isVerifiedKey: Boolean","net.thauvin.erik.akismet.Akismet.isVerifiedKey"]},{"name":"var permalink: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.permalink","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/permalink.html","searchKeys":["permalink","var permalink: String","net.thauvin.erik.akismet.CommentConfig.Builder.permalink"]},{"name":"var permalink: String","description":"net.thauvin.erik.akismet.CommentConfig.permalink","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/permalink.html","searchKeys":["permalink","var permalink: String","net.thauvin.erik.akismet.CommentConfig.permalink"]},{"name":"var permalink: String?","description":"net.thauvin.erik.akismet.AkismetComment.permalink","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/permalink.html","searchKeys":["permalink","var permalink: String?","net.thauvin.erik.akismet.AkismetComment.permalink"]},{"name":"var postModifiedGmt: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.postModifiedGmt","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/post-modified-gmt.html","searchKeys":["postModifiedGmt","var postModifiedGmt: String","net.thauvin.erik.akismet.CommentConfig.Builder.postModifiedGmt"]},{"name":"var postModifiedGmt: String","description":"net.thauvin.erik.akismet.CommentConfig.postModifiedGmt","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/post-modified-gmt.html","searchKeys":["postModifiedGmt","var postModifiedGmt: String","net.thauvin.erik.akismet.CommentConfig.postModifiedGmt"]},{"name":"var postModifiedGmt: String?","description":"net.thauvin.erik.akismet.AkismetComment.postModifiedGmt","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/post-modified-gmt.html","searchKeys":["postModifiedGmt","var postModifiedGmt: String?","net.thauvin.erik.akismet.AkismetComment.postModifiedGmt"]},{"name":"var proTip: String","description":"net.thauvin.erik.akismet.Akismet.proTip","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/pro-tip.html","searchKeys":["proTip","var proTip: String","net.thauvin.erik.akismet.Akismet.proTip"]},{"name":"var recheckReason: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.recheckReason","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/recheck-reason.html","searchKeys":["recheckReason","var recheckReason: String","net.thauvin.erik.akismet.CommentConfig.Builder.recheckReason"]},{"name":"var recheckReason: String","description":"net.thauvin.erik.akismet.CommentConfig.recheckReason","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/recheck-reason.html","searchKeys":["recheckReason","var recheckReason: String","net.thauvin.erik.akismet.CommentConfig.recheckReason"]},{"name":"var recheckReason: String?","description":"net.thauvin.erik.akismet.AkismetComment.recheckReason","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/recheck-reason.html","searchKeys":["recheckReason","var recheckReason: String?","net.thauvin.erik.akismet.AkismetComment.recheckReason"]},{"name":"var referrer: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.referrer","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/referrer.html","searchKeys":["referrer","var referrer: String","net.thauvin.erik.akismet.CommentConfig.Builder.referrer"]},{"name":"var referrer: String","description":"net.thauvin.erik.akismet.CommentConfig.referrer","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/referrer.html","searchKeys":["referrer","var referrer: String","net.thauvin.erik.akismet.CommentConfig.referrer"]},{"name":"var referrer: String?","description":"net.thauvin.erik.akismet.AkismetComment.referrer","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/referrer.html","searchKeys":["referrer","var referrer: String?","net.thauvin.erik.akismet.AkismetComment.referrer"]},{"name":"var response: String","description":"net.thauvin.erik.akismet.Akismet.response","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet/response.html","searchKeys":["response","var response: String","net.thauvin.erik.akismet.Akismet.response"]},{"name":"var serverEnv: Map","description":"net.thauvin.erik.akismet.AkismetComment.serverEnv","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/server-env.html","searchKeys":["serverEnv","var serverEnv: Map","net.thauvin.erik.akismet.AkismetComment.serverEnv"]},{"name":"var serverEnv: Map","description":"net.thauvin.erik.akismet.CommentConfig.Builder.serverEnv","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/server-env.html","searchKeys":["serverEnv","var serverEnv: Map","net.thauvin.erik.akismet.CommentConfig.Builder.serverEnv"]},{"name":"var serverEnv: Map","description":"net.thauvin.erik.akismet.CommentConfig.serverEnv","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/server-env.html","searchKeys":["serverEnv","var serverEnv: Map","net.thauvin.erik.akismet.CommentConfig.serverEnv"]},{"name":"var type: CommentType","description":"net.thauvin.erik.akismet.AkismetComment.type","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/type.html","searchKeys":["type","var type: CommentType","net.thauvin.erik.akismet.AkismetComment.type"]},{"name":"var type: CommentType","description":"net.thauvin.erik.akismet.CommentConfig.Builder.type","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/type.html","searchKeys":["type","var type: CommentType","net.thauvin.erik.akismet.CommentConfig.Builder.type"]},{"name":"var type: CommentType","description":"net.thauvin.erik.akismet.CommentConfig.type","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/type.html","searchKeys":["type","var type: CommentType","net.thauvin.erik.akismet.CommentConfig.type"]},{"name":"var userAgent: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.userAgent","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-agent.html","searchKeys":["userAgent","var userAgent: String","net.thauvin.erik.akismet.CommentConfig.Builder.userAgent"]},{"name":"var userAgent: String","description":"net.thauvin.erik.akismet.CommentConfig.userAgent","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-agent.html","searchKeys":["userAgent","var userAgent: String","net.thauvin.erik.akismet.CommentConfig.userAgent"]},{"name":"var userIp: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.userIp","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-ip.html","searchKeys":["userIp","var userIp: String","net.thauvin.erik.akismet.CommentConfig.Builder.userIp"]},{"name":"var userIp: String","description":"net.thauvin.erik.akismet.CommentConfig.userIp","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-ip.html","searchKeys":["userIp","var userIp: String","net.thauvin.erik.akismet.CommentConfig.userIp"]},{"name":"var userRole: String","description":"net.thauvin.erik.akismet.CommentConfig.Builder.userRole","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/-builder/user-role.html","searchKeys":["userRole","var userRole: String","net.thauvin.erik.akismet.CommentConfig.Builder.userRole"]},{"name":"var userRole: String","description":"net.thauvin.erik.akismet.CommentConfig.userRole","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-config/user-role.html","searchKeys":["userRole","var userRole: String","net.thauvin.erik.akismet.CommentConfig.userRole"]},{"name":"var userRole: String?","description":"net.thauvin.erik.akismet.AkismetComment.userRole","location":"-akismet -kotlin/net.thauvin.erik.akismet/-akismet-comment/user-role.html","searchKeys":["userRole","var userRole: String?","net.thauvin.erik.akismet.AkismetComment.userRole"]},{"name":"var value: String","description":"net.thauvin.erik.akismet.CommentType.value","location":"-akismet -kotlin/net.thauvin.erik.akismet/-comment-type/value.html","searchKeys":["value","var value: String","net.thauvin.erik.akismet.CommentType.value"]}] diff --git a/docs/scripts/platform-content-handler.js b/docs/scripts/platform-content-handler.js index 7c5e8af..811c478 100644 --- a/docs/scripts/platform-content-handler.js +++ b/docs/scripts/platform-content-handler.js @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + filteringContext = { dependencies: {}, restrictedDependencies: [], @@ -14,8 +18,6 @@ const samplesLightThemeName = 'idea' window.addEventListener('load', () => { document.querySelectorAll("div[data-platform-hinted]") .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event, elem))) - document.querySelectorAll("div[tabs-section]") - .forEach(elem => elem.addEventListener('click', (event) => toggleSectionsEventHandler(event))) const filterSection = document.getElementById('filter-section') if (filterSection) { filterSection.addEventListener('click', (event) => filterButtonHandler(event)) @@ -173,19 +175,30 @@ function handleAnchor() { } function initTabs() { - document.querySelectorAll("div[tabs-section]") - .forEach(element => { - showCorrespondingTabBody(element) - element.addEventListener('click', (event) => toggleSectionsEventHandler(event)) - }) - let cached = localStorage.getItem("active-tab") - if (cached) { - let parsed = JSON.parse(cached) - let tab = document.querySelector('div[tabs-section] > button[data-togglable="' + parsed + '"]') - if (tab) { - toggleSections(tab) - } - } + // we could have only a single type of data - classlike or package + const mainContent = document.querySelector('.main-content'); + const type = mainContent ? mainContent.getAttribute("data-page-type") : null; + const localStorageKey = "active-tab-" + type; + document.querySelectorAll('div[tabs-section]').forEach(element => { + showCorrespondingTabBody(element); + element.addEventListener('click', ({target}) => { + const togglable = target ? target.getAttribute("data-togglable") : null; + if (!togglable) return; + + localStorage.setItem(localStorageKey, JSON.stringify(togglable)); + toggleSections(target); + }); + }); + + const cached = localStorage.getItem(localStorageKey); + if (!cached) return; + + const tab = document.querySelector( + 'div[tabs-section] > button[data-togglable="' + JSON.parse(cached) + '"]' + ); + if (!tab) return; + + toggleSections(tab); } function showCorrespondingTabBody(element) { @@ -289,12 +302,6 @@ function toggleSections(target) { activateTabsBody("tabs-section-body") } -function toggleSectionsEventHandler(evt) { - if (!evt.target.getAttribute("data-togglable")) return - localStorage.setItem('active-tab', JSON.stringify(evt.target.getAttribute("data-togglable"))) - toggleSections(evt.target) -} - function togglePlatformDependent(e, container) { let target = e.target if (target.tagName != 'BUTTON') return; diff --git a/docs/scripts/sourceset_dependencies.js b/docs/scripts/sourceset_dependencies.js index b3aa738..9d52f63 100644 --- a/docs/scripts/sourceset_dependencies.js +++ b/docs/scripts/sourceset_dependencies.js @@ -1 +1 @@ -sourceset_dependencies='{":dokkaHtml/main":[]}' +sourceset_dependencies='{"root/main":[]}' diff --git a/docs/scripts/symbol-parameters-wrapper_deferred.js b/docs/scripts/symbol-parameters-wrapper_deferred.js index 248d0ab..7ecae7a 100644 --- a/docs/scripts/symbol-parameters-wrapper_deferred.js +++ b/docs/scripts/symbol-parameters-wrapper_deferred.js @@ -1,83 +1,64 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + // helps with some corner cases where starts working already, // but the signature is not yet long enough to be wrapped -const leftPaddingPx = 60 +(function() { + const leftPaddingPx = 60; -const symbolResizeObserver = new ResizeObserver(entries => { - entries.forEach(entry => { - const symbolElement = entry.target - symbolResizeObserver.unobserve(symbolElement) // only need it once, otherwise will be executed multiple times - wrapSymbolParameters(symbolElement); - }) -}); - -const wrapAllSymbolParameters = () => { - document.querySelectorAll("div.symbol").forEach(symbol => wrapSymbolParameters(symbol)) -} - -const wrapSymbolParameters = (symbol) => { - let parametersBlock = symbol.querySelector("span.parameters") - if (parametersBlock == null) { - return // nothing to wrap + function createNbspIndent() { + let indent = document.createElement("span"); + indent.append(document.createTextNode("\u00A0\u00A0\u00A0\u00A0")); + indent.classList.add("nbsp-indent"); + return indent; } - let symbolBlockWidth = symbol.clientWidth + function wrapSymbolParameters(entry) { + const symbol = entry.target; + const symbolBlockWidth = entry.borderBoxSize && entry.borderBoxSize[0] && entry.borderBoxSize[0].inlineSize; - // Even though the script is marked as `defer` and we wait for `DOMContentLoaded` event, - // it can happen that `symbolBlockWidth` is 0, indicating that something hasn't been loaded. - // In this case, just retry once all styles have been applied and it has been resized correctly. - if (symbolBlockWidth === 0) { - symbolResizeObserver.observe(symbol) - return + // Even though the script is marked as `defer` and we wait for `DOMContentLoaded` event, + // or if this block is a part of hidden tab, it can happen that `symbolBlockWidth` is 0, + // indicating that something hasn't been loaded. + // In this case, observer will be triggered onсe again when it will be ready. + if (symbolBlockWidth > 0) { + const node = symbol.querySelector(".parameters"); + + if (node) { + // if window resize happened and observer was triggered, reset previously wrapped + // parameters as they might not need wrapping anymore, and check again + node.classList.remove("wrapped"); + node.querySelectorAll(".parameter .nbsp-indent") + .forEach(indent => indent.remove()); + + const innerTextWidth = Array.from(symbol.children) + .filter(it => !it.classList.contains("block")) // blocks are usually on their own (like annotations), so ignore it + .map(it => it.getBoundingClientRect().width) + .reduce((a, b) => a + b, 0); + + // if signature text takes up more than a single line, wrap params for readability + if (innerTextWidth > (symbolBlockWidth - leftPaddingPx)) { + node.classList.add("wrapped"); + node.querySelectorAll(".parameter").forEach(param => { + // has to be a physical indent so that it can be copied. styles like + // paddings and `::before { content: " " }` do not work for that + param.prepend(createNbspIndent()); + }); + } + } + } } - let innerTextWidth = Array.from(symbol.children) - .filter(it => !it.classList.contains("block")) // blocks are usually on their own (like annotations), so ignore it - .map(it => it.getBoundingClientRect().width).reduce((a, b) => a + b, 0) + const symbolsObserver = new ResizeObserver(entries => entries.forEach(wrapSymbolParameters)); - // if signature text takes up more than a single line, wrap params for readability - let shouldWrapParams = innerTextWidth > (symbolBlockWidth - leftPaddingPx) - if (shouldWrapParams) { - parametersBlock.classList.add("wrapped") - parametersBlock.querySelectorAll("span.parameter").forEach(param => { - // has to be a physical indent so that it can be copied. styles like - // paddings and `::before { content: " " }` do not work for that - param.prepend(createNbspIndent()) - }) + function initHandlers() { + document.querySelectorAll("div.symbol").forEach(symbol => symbolsObserver.observe(symbol)); } -} -const createNbspIndent = () => { - let indent = document.createElement("span") - indent.append(document.createTextNode("\u00A0\u00A0\u00A0\u00A0")) - indent.classList.add("nbsp-indent") - return indent -} + if (document.readyState === 'loading') window.addEventListener('DOMContentLoaded', initHandlers); + else initHandlers(); -const resetAllSymbolParametersWrapping = () => { - document.querySelectorAll("div.symbol").forEach(symbol => resetSymbolParametersWrapping(symbol)) -} - -const resetSymbolParametersWrapping = (symbol) => { - let parameters = symbol.querySelector("span.parameters") - if (parameters != null) { - parameters.classList.remove("wrapped") - parameters.querySelectorAll("span.parameter").forEach(param => { - let indent = param.querySelector("span.nbsp-indent") - if (indent != null) indent.remove() - }) - } -} - -if (document.readyState === 'loading') { - window.addEventListener('DOMContentLoaded', () => { - wrapAllSymbolParameters() - }) -} else { - wrapAllSymbolParameters() -} - -window.onresize = event => { - // need to re-calculate if params need to be wrapped after resize - resetAllSymbolParametersWrapping() - wrapAllSymbolParameters() -} + // ToDo: Add `unobserve` if dokka will be SPA-like: + // https://github.com/w3c/csswg-drafts/issues/5155 +})(); diff --git a/docs/styles/font-jb-sans-auto.css b/docs/styles/font-jb-sans-auto.css index 95d8ef8..bdc6872 100644 --- a/docs/styles/font-jb-sans-auto.css +++ b/docs/styles/font-jb-sans-auto.css @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + /* Light weight */ @font-face { font-family: 'JetBrains Sans'; diff --git a/docs/styles/jetbrains-mono.css b/docs/styles/jetbrains-mono.css deleted file mode 100644 index 9a0f06f..0000000 --- a/docs/styles/jetbrains-mono.css +++ /dev/null @@ -1,17 +0,0 @@ -@font-face{ - font-family: 'JetBrains Mono'; - src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/web/JetBrainsMono-Regular.eot') format('embedded-opentype'), - url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2'), - url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Regular.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} - -@font-face{ - font-family: 'JetBrains Mono'; - src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/web/JetBrainsMono-Bold.eot') format('embedded-opentype'), - url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Bold.woff2') format('woff2'), - url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Bold.ttf') format('truetype'); - font-weight: bold; - font-style: bold; -} \ No newline at end of file diff --git a/docs/styles/logo-styles.css b/docs/styles/logo-styles.css index f3846e8..69804e4 100644 --- a/docs/styles/logo-styles.css +++ b/docs/styles/logo-styles.css @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + :root { --dokka-logo-image-url: url('../images/logo-icon.svg'); --dokka-logo-height: 50px; diff --git a/docs/styles/main.css b/docs/styles/main.css index 5aa04a4..5f7781e 100644 --- a/docs/styles/main.css +++ b/docs/styles/main.css @@ -1,4 +1,6 @@ -#pages-search{cursor:pointer;border:none;border-radius:50%;background:transparent;fill:#fff;fill:var(--dark-mode-and-search-icon-color)}#pages-search:focus{outline:none}#pages-search:hover{background:var(--white-10)}.search,.search [data-test=ring-select],.search [data-test=ring-tooltip],.search [data-test=ring-select_focus],.search #pages-search{display:inline-block;padding:0;margin:0;font-size:0;line-height:0}.search-hotkey-popup{background-color:var(--background-color) !important;padding:4px}.popup-wrapper{min-width:calc(100% - 322px) !important;border:1px solid rgba(255,255,255,.2) !important;background-color:#27282c !important}.popup-wrapper [class^=filterWrapper]{border-bottom:1px solid rgba(255,255,255,.2)}.popup-wrapper input{color:rgba(255,255,255,.8) !important;font-weight:normal !important}.popup-wrapper span[data-test-custom=ring-select-popup-filter-icon]{color:#fff}.popup-wrapper button[data-test=ring-input-clear]{color:#fff !important}@media screen and (max-width: 759px){.popup-wrapper{min-width:100% !important}}.template-wrapper{display:grid;height:32px;grid-template-columns:auto auto}.template-wrapper strong{color:rgba(255,255,255,.8)}.template-wrapper span{color:rgba(255,255,255,.8);line-height:32px}.template-wrapper span.template-description{color:rgba(255,255,255,.6);justify-self:end}@media screen and (max-width: 759px){.template-wrapper{display:flex;flex-direction:column;height:auto}.template-wrapper span{line-height:unset}}.template-name{justify-self:start}[class^=fade]{display:none}[class*=hover]{background-color:rgba(255,255,255,.1) !important} +/*! + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */#pages-search{cursor:pointer;border:none;border-radius:50%;background:transparent;fill:#fff;fill:var(--dark-mode-and-search-icon-color)}#pages-search:hover{background:var(--white-10)}.search,.search [data-test=ring-select],.search [data-test=ring-tooltip],.search [data-test=ring-select_focus],.search #pages-search{display:inline-block;padding:0;margin:0;font-size:0;line-height:0}.search-hotkey-popup{background-color:var(--background-color) !important;padding:4px}.popup-wrapper{min-width:calc(100% - 322px) !important;border:1px solid rgba(255,255,255,.2) !important;background-color:#27282c !important;color:rgba(255,255,255,.8)}.popup-wrapper [class^=filterWrapper]{border-bottom:1px solid rgba(255,255,255,.2)}.popup-wrapper input{color:rgba(255,255,255,.8) !important;font-weight:normal !important}.popup-wrapper span[data-test-custom=ring-select-popup-filter-icon]{color:#fff}.popup-wrapper button[data-test=ring-input-clear]{color:#fff !important}@media screen and (max-width: 759px){.popup-wrapper{min-width:100% !important}}.template-wrapper{display:grid;height:32px;grid-template-columns:auto auto}.template-wrapper strong{color:rgba(255,255,255,.8)}.template-wrapper span{color:rgba(255,255,255,.8);line-height:32px}.template-wrapper span.template-description{color:rgba(255,255,255,.6);justify-self:end}@media screen and (max-width: 759px){.template-wrapper{display:flex;flex-direction:column;height:auto}.template-wrapper span{line-height:unset}}.template-name{justify-self:start}[class^=fade]{display:none}[class*=hover]{background-color:rgba(255,255,255,.1) !important} /* stylelint-disable color-no-hex */ :root { @@ -113,6 +115,10 @@ --ring-alert-z-index: 6; } -html,.app-root{height:100%}.search-root{margin:0;padding:0;background:var(--ring-content-background-color);font-family:var(--ring-font-family);font-size:var(--ring-font-size);line-height:var(--ring-line-height)}.search-content{z-index:8} +/*! + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + *//*! + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */html,.app-root{height:100%}.search-root{margin:0;padding:0;background:var(--ring-content-background-color);font-family:var(--ring-font-family);font-size:var(--ring-font-size);line-height:var(--ring-line-height)}.search-content{z-index:8} /*# sourceMappingURL=main.css.map*/ \ No newline at end of file diff --git a/docs/styles/prism.css b/docs/styles/prism.css index 4287f6d..2d3a091 100644 --- a/docs/styles/prism.css +++ b/docs/styles/prism.css @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + /* * Custom Dokka styles */ diff --git a/docs/styles/style.css b/docs/styles/style.css index 7f6e4b0..fc2b84d 100644 --- a/docs/styles/style.css +++ b/docs/styles/style.css @@ -1,3 +1,7 @@ +/* + * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. + */ + @import url('./font-jb-sans-auto.css'); @import url('https://fonts.googleapis.com/css?family=JetBrains+Mono'); @@ -338,6 +342,7 @@ td:first-child { /* --- Navigation controls --- */ .navigation-controls { display: flex; + margin-left: 4px; } @media (min-width: 760px) { @@ -350,37 +355,31 @@ td:first-child { display: none; } -/* --- Navigation THEME --- */ -.navigation-controls--search { +.navigation-controls--btn { display: inline-flex; - font-size: 0; - line-height: 0; -} - -.navigation-controls--theme { - display: block; + align-items: center; + justify-content: center; + width: 40px; + height: 40px; border-radius: 50%; background-color: inherit; - margin-left: 4px; + background-position: 50% 50%; padding: 0; border: none; cursor: pointer; font-size: 0; line-height: 0; + transition: background-color 200ms ease-in-out; + will-change: background-color; } -.navigation-controls--theme::before { - height: 40px; - width: 40px; +.navigation-controls--btn:hover { + background-color: var(--white-10); } -.navigation-controls--theme:hover { - background: var(--white-10); -} - -.navigation-controls--theme::before { - display: block; - content: url("../images/theme-toggle.svg"); +.navigation-controls--theme { + background-image: url("../images/theme-toggle.svg"); + background-repeat: no-repeat; } @media (max-width: 759px) { @@ -388,7 +387,18 @@ td:first-child { display: none; } } -/* /--- Navigation THEME --- */ + +.navigation-controls--homepage { + background-image: url("../images/homepage.svg"); + background-repeat: no-repeat; + background-size: 24px 24px; +} + +@media (max-width: 759px) { + .navigation-controls--homepage { + display: none; + } +} .navigation .platform-selector:not([data-active]) { color: #fff; @@ -652,6 +662,26 @@ code.paragraph { text-decoration: line-through; } +/* Workaround for Firefox https://github.com/Kotlin/dokka/issues/3156 */ +@-moz-document url-prefix() { + .strikethrough { + position: relative; + text-decoration: none; + } + + /* complex selectors here are required to handle multiline cases */ + .strikethrough::after, .strikethrough span:after { + content: ''; + position: absolute; + top: 7px; + left: 0; + right: 0; + height: 1px; + background-color: currentColor; + z-index: 1; + } +} + .symbol:empty { padding: 0; } @@ -680,7 +710,7 @@ code { code:not(.block) { display: inline-block; - vertical-align: middle; + vertical-align: bottom; } .symbol > a { @@ -1476,4 +1506,4 @@ has only one header, and the header text is the same as the tab name, so no poin */ .main-content[data-page-type="package"] .tabs-section-body h2 { display: none; -} \ No newline at end of file +} diff --git a/examples/.idea/.name b/examples/.idea/.name deleted file mode 100644 index bdb1d33..0000000 --- a/examples/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -akismet-examples \ No newline at end of file diff --git a/examples/.idea/checkstyle-idea.xml b/examples/.idea/checkstyle-idea.xml deleted file mode 100644 index ead1d8a..0000000 --- a/examples/.idea/checkstyle-idea.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/examples/bld/.gitignore b/examples/bld/.gitignore new file mode 100644 index 0000000..a2805aa --- /dev/null +++ b/examples/bld/.gitignore @@ -0,0 +1,55 @@ +.gradle +.DS_Store +build +lib/bld/** +!lib/bld/bld-wrapper.jar +!lib/bld/bld-wrapper.properties +lib/compile/ +lib/runtime/ +lib/standalone/ +lib/test/ + +# IDEA ignores + +# User-specific +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Editor-based Rest Client +.idea/httpRequests \ No newline at end of file diff --git a/examples/bld/.idea/.gitignore b/examples/bld/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/examples/bld/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/examples/bld/.idea/.name b/examples/bld/.idea/.name new file mode 100644 index 0000000..2ee9f40 --- /dev/null +++ b/examples/bld/.idea/.name @@ -0,0 +1 @@ +akismet-kotlin-examples-bld \ No newline at end of file diff --git a/examples/bld/.idea/app.iml b/examples/bld/.idea/app.iml new file mode 100644 index 0000000..2c1fe21 --- /dev/null +++ b/examples/bld/.idea/app.iml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/bld/.idea/bld.iml b/examples/bld/.idea/bld.iml new file mode 100644 index 0000000..e63e11e --- /dev/null +++ b/examples/bld/.idea/bld.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/bld/.idea/inspectionProfiles/Project_Default.xml b/examples/bld/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..1e01b48 --- /dev/null +++ b/examples/bld/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/examples/bld/.idea/libraries/bld.xml b/examples/bld/.idea/libraries/bld.xml new file mode 100644 index 0000000..153a060 --- /dev/null +++ b/examples/bld/.idea/libraries/bld.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/examples/bld/.idea/libraries/compile.xml b/examples/bld/.idea/libraries/compile.xml new file mode 100644 index 0000000..99cc0c0 --- /dev/null +++ b/examples/bld/.idea/libraries/compile.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/bld/.idea/libraries/runtime.xml b/examples/bld/.idea/libraries/runtime.xml new file mode 100644 index 0000000..d4069f2 --- /dev/null +++ b/examples/bld/.idea/libraries/runtime.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/bld/.idea/libraries/test.xml b/examples/bld/.idea/libraries/test.xml new file mode 100644 index 0000000..57ed5ef --- /dev/null +++ b/examples/bld/.idea/libraries/test.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/bld/.idea/misc.xml b/examples/bld/.idea/misc.xml new file mode 100644 index 0000000..542659b --- /dev/null +++ b/examples/bld/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/examples/bld/.idea/modules.xml b/examples/bld/.idea/modules.xml new file mode 100644 index 0000000..55adcb9 --- /dev/null +++ b/examples/bld/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/examples/bld/.idea/vcs.xml b/examples/bld/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/examples/bld/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/examples/bld/.vscode/launch.json b/examples/bld/.vscode/launch.json new file mode 100644 index 0000000..30a8889 --- /dev/null +++ b/examples/bld/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "java", + "name": "Run Tests", + "request": "launch", + "mainClass": "com.example.ExampleTest" + } + ] +} diff --git a/examples/bld/.vscode/settings.json b/examples/bld/.vscode/settings.json new file mode 100644 index 0000000..ba429d0 --- /dev/null +++ b/examples/bld/.vscode/settings.json @@ -0,0 +1,15 @@ +{ + "java.project.sourcePaths": [ + "src/main/java", + "src/main/resources", + "src/test/java", + "src/test/resources", + "src/bld/java", + "src/bld/resources" + ], + "java.configuration.updateBuildConfiguration": "automatic", + "java.project.referencedLibraries": [ + "${HOME}/.bld/dist/bld-2.2.1.jar", + "lib/**/*.jar" + ] +} diff --git a/examples/bld/README.md b/examples/bld/README.md new file mode 100644 index 0000000..9786305 --- /dev/null +++ b/examples/bld/README.md @@ -0,0 +1,17 @@ +## Kotlin Example +To compile & run the Kotlin example: + +```console +./bld compile + +./bld run --args=API_KEY +``` + +## Java Example +To compile & run the Java example: + +```console +./bld compile + +./bld run-java --args=API_KEY +``` diff --git a/examples/bld/bld b/examples/bld/bld new file mode 100755 index 0000000..80d2986 --- /dev/null +++ b/examples/bld/bld @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +java -jar "$(dirname "$0")/lib/bld/bld-wrapper.jar" "$0" --build com.example.ExampleBuild "$@" \ No newline at end of file diff --git a/examples/bld/bld.bat b/examples/bld/bld.bat new file mode 100644 index 0000000..084bb72 --- /dev/null +++ b/examples/bld/bld.bat @@ -0,0 +1,4 @@ +@echo off +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +java -jar "%DIRNAME%/lib/bld/bld-wrapper.jar" "%0" --build com.example.ExampleBuild %* \ No newline at end of file diff --git a/examples/bld/lib/bld/bld-wrapper.jar b/examples/bld/lib/bld/bld-wrapper.jar new file mode 100644 index 0000000..e09b503 Binary files /dev/null and b/examples/bld/lib/bld/bld-wrapper.jar differ diff --git a/examples/bld/lib/bld/bld-wrapper.properties b/examples/bld/lib/bld/bld-wrapper.properties new file mode 100644 index 0000000..1ffe3ff --- /dev/null +++ b/examples/bld/lib/bld/bld-wrapper.properties @@ -0,0 +1,7 @@ +bld.downloadExtensionJavadoc=false +bld.downloadExtensionSources=true +bld.downloadLocation= +bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4 +bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES +bld.sourceDirectories= +bld.version=2.2.1 diff --git a/examples/bld/src/bld/java/com/example/ExampleBuild.java b/examples/bld/src/bld/java/com/example/ExampleBuild.java new file mode 100644 index 0000000..9e11c5b --- /dev/null +++ b/examples/bld/src/bld/java/com/example/ExampleBuild.java @@ -0,0 +1,52 @@ +package com.example; + +import rife.bld.BaseProject; +import rife.bld.BuildCommand; +import rife.bld.extension.CompileKotlinOperation; +import rife.bld.operations.RunOperation; + +import java.util.List; + +import static rife.bld.dependencies.Repository.*; +import static rife.bld.dependencies.Scope.compile; + +public class ExampleBuild extends BaseProject { + public ExampleBuild() { + pkg = "com.example"; + name = "Example"; + version = version(0, 1, 0); + + mainClass = "com.example.AkismetExampleKt"; + + javaRelease = 11; + downloadSources = true; + autoDownloadPurge = true; + repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, SONATYPE_SNAPSHOTS_LEGACY); + + scope(compile) + .include(dependency("net.thauvin.erik:akismet-kotlin:1.1.0-SNAPSHOT")) + .include(dependency("jakarta.servlet:jakarta.servlet-api:6.1.0")); + } + + public static void main(String[] args) { + new ExampleBuild().start(args); + } + + @Override + public void compile() throws Exception { + new CompileKotlinOperation() + .fromProject(this) + .execute(); + + // Also compile the Java source code + super.compile(); + } + + @BuildCommand(value = "run-java", summary = "Runs the Java example") + public void runJava() throws Exception { + new RunOperation() + .fromProject(this) + .mainClass("com.example.AkismetSample") + .execute(); + } +} diff --git a/examples/src/main/java/com/example/AkismetSample.java b/examples/bld/src/main/java/com/example/AkismetSample.java similarity index 58% rename from examples/src/main/java/com/example/AkismetSample.java rename to examples/bld/src/main/java/com/example/AkismetSample.java index f70698f..85e2f15 100644 --- a/examples/src/main/java/com/example/AkismetSample.java +++ b/examples/bld/src/main/java/com/example/AkismetSample.java @@ -2,6 +2,8 @@ package com.example; import net.thauvin.erik.akismet.Akismet; import net.thauvin.erik.akismet.AkismetComment; +import net.thauvin.erik.akismet.CommentConfig; +import net.thauvin.erik.akismet.CommentType; import java.util.Date; @@ -9,25 +11,26 @@ public class AkismetSample { public static void main(String... args) { if (args.length == 1 && !args[0].isBlank()) { final Akismet akismet = new Akismet(args[0], "https://yourblogdomainname.com/blog/"); - final AkismetComment comment = new AkismetComment("127.0.0.1", "curl/7.29.0"); + final AkismetComment comment = new AkismetComment( + new CommentConfig.Builder("127.0.0.1", "curl/7.29.0") + .isTest(true) + .referrer("https://www.google.com") + .permalink(akismet.getBlog() + "post=1") + .type(CommentType.COMMENT) + .author("admin") + .authorEmail("test@test.com") + .authorUrl("http://www.CheckOutMyCoolSite.com") + .dateGmt(Akismet.dateToGmt(new Date())) +// .userRole(AkismetComment.ADMIN_ROLE) + .content("It means a lot that you would take the time to review our software. Thanks again.") + .build() + ); - comment.setTest(true); - - comment.setReferrer("https://www.google.com"); - comment.setPermalink(akismet.getBlog() + "post=1"); - comment.setType(AkismetComment.TYPE_COMMENT); - comment.setAuthor("admin"); - comment.setAuthorEmail("test@test.com"); - comment.setAuthorUrl("http://www.CheckOutMyCoolSite.com"); - comment.setDateGmt(Akismet.dateToGmt(new Date())); - // comment.setUserRole(AkismetComment.ADMIN_ROLE); - comment.setContent("It means a lot that you would take the time to review our software. Thanks again."); - - // final ConsoleHandler consoleHandler = new ConsoleHandler(); - // consoleHandler.setLevel(Level.FINE); - // final Logger logger = akismet.getLogger(); - // logger.addHandler(consoleHandler); - // logger.setLevel(Level.FINE); +// final ConsoleHandler consoleHandler = new ConsoleHandler(); +// consoleHandler.setLevel(Level.FINE); +// final Logger logger = akismet.getLogger(); +// logger.addHandler(consoleHandler); +// logger.setLevel(Level.FINE); if (akismet.verifyKey()) { final boolean isSpam = akismet.checkComment(comment); diff --git a/examples/src/main/kotlin/com/example/AkismetExample.kt b/examples/bld/src/main/kotlin/com/example/AkismetExample.kt similarity index 91% rename from examples/src/main/kotlin/com/example/AkismetExample.kt rename to examples/bld/src/main/kotlin/com/example/AkismetExample.kt index 149555f..be314f6 100644 --- a/examples/src/main/kotlin/com/example/AkismetExample.kt +++ b/examples/bld/src/main/kotlin/com/example/AkismetExample.kt @@ -2,26 +2,23 @@ package com.example import net.thauvin.erik.akismet.Akismet import net.thauvin.erik.akismet.AkismetComment -import java.util.Date +import net.thauvin.erik.akismet.CommentType +import java.util.* import kotlin.system.exitProcess fun main(args: Array) { - if (args.size == 1 && args[0].isNotEmpty()) { val akismet = Akismet(apiKey = args[0], blog = "https://yourblogdomainname.com/blog/") - val comment = AkismetComment(userIp = "127.0.0.1", userAgent = "curl/7.29.0") - - with(comment) { + val comment = AkismetComment(userIp = "127.0.0.1", userAgent = "curl/7.29.0").apply { isTest = true - referrer = "https://www.google.com" permalink = "${akismet.blog}post=1" - type = AkismetComment.TYPE_COMMENT + type = CommentType.COMMENT author = "admin" authorEmail = "test@test.com" authorUrl = "https://www.CheckOutMyCoolSite.com" dateGmt = Akismet.dateToGmt(Date()) -// userRole = AkismetComment.ADMIN_ROLE +// userRole = AkismetComment.ADMIN_ROLE content = "It means a lot that you would take the time to review our software. Thanks again." } diff --git a/examples/src/main/kotlin/com/example/AkismetServlet.kt b/examples/bld/src/main/kotlin/com/example/AkismetServlet.kt similarity index 91% rename from examples/src/main/kotlin/com/example/AkismetServlet.kt rename to examples/bld/src/main/kotlin/com/example/AkismetServlet.kt index 4b245c8..7e47ec3 100644 --- a/examples/src/main/kotlin/com/example/AkismetServlet.kt +++ b/examples/bld/src/main/kotlin/com/example/AkismetServlet.kt @@ -7,8 +7,9 @@ import jakarta.servlet.http.HttpServletRequest import jakarta.servlet.http.HttpServletResponse import net.thauvin.erik.akismet.Akismet import net.thauvin.erik.akismet.AkismetComment +import net.thauvin.erik.akismet.CommentType import java.io.IOException -import java.util.Date +import java.util.* @WebServlet(description = "Akismet Servlet", displayName = "Akismet", urlPatterns = ["/comment/*"]) class AkismetServlet : HttpServlet() { @@ -20,10 +21,9 @@ class AkismetServlet : HttpServlet() { akismet.appUserAgent = request.servletContext.serverInfo - val comment = AkismetComment(request) - with(comment) { + val comment = AkismetComment(request).apply { permalink = "${akismet.blog}/comment/$id" - type = AkismetComment.TYPE_COMMENT + type = CommentType.COMMENT author = request.getParameter("name") authorEmail = request.getParameter("email") dateGmt = Akismet.dateToGmt(Date()) diff --git a/examples/.editorconfig b/examples/gradle/.editorconfig similarity index 100% rename from examples/.editorconfig rename to examples/gradle/.editorconfig diff --git a/examples/.gitattributes b/examples/gradle/.gitattributes similarity index 100% rename from examples/.gitattributes rename to examples/gradle/.gitattributes diff --git a/examples/.gitignore b/examples/gradle/.gitignore similarity index 100% rename from examples/.gitignore rename to examples/gradle/.gitignore diff --git a/examples/gradle/.idea/.gitignore b/examples/gradle/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/examples/gradle/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/examples/gradle/.idea/.name b/examples/gradle/.idea/.name new file mode 100644 index 0000000..420230f --- /dev/null +++ b/examples/gradle/.idea/.name @@ -0,0 +1 @@ +akismet-kotlin-examples-gradle \ No newline at end of file diff --git a/.idea/checkstyle-idea.xml b/examples/gradle/.idea/checkstyle-idea.xml similarity index 100% rename from .idea/checkstyle-idea.xml rename to examples/gradle/.idea/checkstyle-idea.xml diff --git a/examples/.idea/codeStyles/codeStyleConfig.xml b/examples/gradle/.idea/codeStyles/codeStyleConfig.xml similarity index 100% rename from examples/.idea/codeStyles/codeStyleConfig.xml rename to examples/gradle/.idea/codeStyles/codeStyleConfig.xml diff --git a/examples/.idea/compiler.xml b/examples/gradle/.idea/compiler.xml similarity index 87% rename from examples/.idea/compiler.xml rename to examples/gradle/.idea/compiler.xml index 907f7b6..61ad941 100644 --- a/examples/.idea/compiler.xml +++ b/examples/gradle/.idea/compiler.xml @@ -1,7 +1,7 @@ - + diff --git a/.idea/encodings.xml b/examples/gradle/.idea/encodings.xml similarity index 100% rename from .idea/encodings.xml rename to examples/gradle/.idea/encodings.xml diff --git a/examples/gradle/.idea/gradle.xml b/examples/gradle/.idea/gradle.xml new file mode 100644 index 0000000..ce1c62c --- /dev/null +++ b/examples/gradle/.idea/gradle.xml @@ -0,0 +1,16 @@ + + + + + + + \ No newline at end of file diff --git a/examples/.idea/inspectionProfiles/Project_Default.xml b/examples/gradle/.idea/inspectionProfiles/Project_Default.xml similarity index 100% rename from examples/.idea/inspectionProfiles/Project_Default.xml rename to examples/gradle/.idea/inspectionProfiles/Project_Default.xml diff --git a/examples/gradle/.idea/jarRepositories.xml b/examples/gradle/.idea/jarRepositories.xml new file mode 100644 index 0000000..a529ef2 --- /dev/null +++ b/examples/gradle/.idea/jarRepositories.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/gradle/.idea/kotlinc.xml b/examples/gradle/.idea/kotlinc.xml new file mode 100644 index 0000000..6d0ee1c --- /dev/null +++ b/examples/gradle/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/examples/.idea/misc.xml b/examples/gradle/.idea/misc.xml similarity index 72% rename from examples/.idea/misc.xml rename to examples/gradle/.idea/misc.xml index f09e92a..7f1bfa1 100644 --- a/examples/.idea/misc.xml +++ b/examples/gradle/.idea/misc.xml @@ -6,7 +6,10 @@ - + + + + diff --git a/examples/gradle/.idea/modules.xml b/examples/gradle/.idea/modules.xml new file mode 100644 index 0000000..5cefaa4 --- /dev/null +++ b/examples/gradle/.idea/modules.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/.idea/vcs.xml b/examples/gradle/.idea/vcs.xml similarity index 75% rename from examples/.idea/vcs.xml rename to examples/gradle/.idea/vcs.xml index 6c0b863..64713b8 100644 --- a/examples/.idea/vcs.xml +++ b/examples/gradle/.idea/vcs.xml @@ -1,6 +1,7 @@ + \ No newline at end of file diff --git a/examples/gradle/README.md b/examples/gradle/README.md new file mode 100644 index 0000000..6258631 --- /dev/null +++ b/examples/gradle/README.md @@ -0,0 +1,14 @@ +## Kotlin Example +To compile & run the Kotlin example: + +```console +./gradlew run --args=API_KEY +``` + +## Java Example + +To compile & run the Java example: + +```console +./gradlew runJava --args=API_KEY +``` diff --git a/examples/build.gradle.kts b/examples/gradle/build.gradle.kts similarity index 50% rename from examples/build.gradle.kts rename to examples/gradle/build.gradle.kts index 0bfbac2..1d9e3ef 100644 --- a/examples/build.gradle.kts +++ b/examples/gradle/build.gradle.kts @@ -1,14 +1,9 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { id("application") - id("com.github.ben-manes.versions") version "0.48.0" - kotlin("jvm") version "1.9.10" + id("com.github.ben-manes.versions") version "0.51.0" + kotlin("jvm") version "2.1.20" } -// ./gradlew run --args=API_KEY -// ./gradlew runJava --args=API_KEY - defaultTasks(ApplicationPlugin.TASK_RUN_NAME) repositories { @@ -17,10 +12,8 @@ repositories { } dependencies { -// implementation("javax.servlet:javax.servlet-api:4.0.1") - implementation("jakarta.servlet:jakarta.servlet-api:6.0.0") - - implementation("net.thauvin.erik:akismet-kotlin:1.0.0") + implementation("jakarta.servlet:jakarta.servlet-api:6.1.0") + implementation("net.thauvin.erik:akismet-kotlin:1.1.0-SNAPSHOT") } java { @@ -32,11 +25,11 @@ application { mainClass.set("com.example.AkismetExampleKt") } -tasks { - withType().configureEach { - kotlinOptions.jvmTarget = java.targetCompatibility.toString() - } +kotlin { + compilerOptions.jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11) +} +tasks { register("runJava", JavaExec::class) { group = "application" mainClass.set("com.example.AkismetSample") diff --git a/examples/gradle/gradle/wrapper/gradle-wrapper.jar b/examples/gradle/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..9bbc975 Binary files /dev/null and b/examples/gradle/gradle/wrapper/gradle-wrapper.jar differ diff --git a/examples/gradle/wrapper/gradle-wrapper.properties b/examples/gradle/gradle/wrapper/gradle-wrapper.properties similarity index 94% rename from examples/gradle/wrapper/gradle-wrapper.properties rename to examples/gradle/gradle/wrapper/gradle-wrapper.properties index ac72c34..37f853b 100644 --- a/examples/gradle/wrapper/gradle-wrapper.properties +++ b/examples/gradle/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/examples/gradlew b/examples/gradle/gradlew similarity index 91% rename from examples/gradlew rename to examples/gradle/gradlew index 0adc8e1..faf9300 100755 --- a/examples/gradlew +++ b/examples/gradle/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -145,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -153,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -202,11 +204,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/gradlew.bat b/examples/gradle/gradlew.bat similarity index 91% rename from gradlew.bat rename to examples/gradle/gradlew.bat index 93e3f59..9d21a21 100644 --- a/gradlew.bat +++ b/examples/gradle/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/examples/settings.gradle.kts b/examples/gradle/settings.gradle.kts similarity index 86% rename from examples/settings.gradle.kts rename to examples/gradle/settings.gradle.kts index a8da2aa..56fa529 100644 --- a/examples/settings.gradle.kts +++ b/examples/gradle/settings.gradle.kts @@ -7,4 +7,4 @@ * in the user manual at https://docs.gradle.org/5.6.2/userguide/multi_project_builds.html */ -rootProject.name = "akismet-examples" +rootProject.name = "akismet-kotlin-examples-gradle" diff --git a/examples/gradle/src/main/java/com/example/AkismetSample.java b/examples/gradle/src/main/java/com/example/AkismetSample.java new file mode 100644 index 0000000..85e2f15 --- /dev/null +++ b/examples/gradle/src/main/java/com/example/AkismetSample.java @@ -0,0 +1,67 @@ +package com.example; + +import net.thauvin.erik.akismet.Akismet; +import net.thauvin.erik.akismet.AkismetComment; +import net.thauvin.erik.akismet.CommentConfig; +import net.thauvin.erik.akismet.CommentType; + +import java.util.Date; + +public class AkismetSample { + public static void main(String... args) { + if (args.length == 1 && !args[0].isBlank()) { + final Akismet akismet = new Akismet(args[0], "https://yourblogdomainname.com/blog/"); + final AkismetComment comment = new AkismetComment( + new CommentConfig.Builder("127.0.0.1", "curl/7.29.0") + .isTest(true) + .referrer("https://www.google.com") + .permalink(akismet.getBlog() + "post=1") + .type(CommentType.COMMENT) + .author("admin") + .authorEmail("test@test.com") + .authorUrl("http://www.CheckOutMyCoolSite.com") + .dateGmt(Akismet.dateToGmt(new Date())) +// .userRole(AkismetComment.ADMIN_ROLE) + .content("It means a lot that you would take the time to review our software. Thanks again.") + .build() + ); + +// final ConsoleHandler consoleHandler = new ConsoleHandler(); +// consoleHandler.setLevel(Level.FINE); +// final Logger logger = akismet.getLogger(); +// logger.addHandler(consoleHandler); +// logger.setLevel(Level.FINE); + + if (akismet.verifyKey()) { + final boolean isSpam = akismet.checkComment(comment); + if (isSpam) { + System.out.println("The comment is SPAM according to Akismet."); + + final boolean hasBeenSubmitted = akismet.submitSpam(comment); + if (hasBeenSubmitted) { + System.out.println("The comment has been submitted as SPAM to Akismet"); + } else { + System.err.println(akismet.getErrorMessage()); + } + } else { + System.out.println("The comment is not SPAM according to Akismet."); + + final boolean hasBeenSubmitted = akismet.submitHam(comment); + if (hasBeenSubmitted) { + System.out.println("The comment has been submitted as HAM to Akismet"); + } else { + System.err.println(akismet.getErrorMessage()); + } + } + } else { + System.err.println("Invalid API Key."); + System.exit(1); + } + + System.exit(0); + } else { + System.err.println("Please specify an API key."); + System.exit(1); + } + } +} diff --git a/examples/gradle/src/main/kotlin/com/example/AkismetExample.kt b/examples/gradle/src/main/kotlin/com/example/AkismetExample.kt new file mode 100644 index 0000000..be314f6 --- /dev/null +++ b/examples/gradle/src/main/kotlin/com/example/AkismetExample.kt @@ -0,0 +1,63 @@ +package com.example + +import net.thauvin.erik.akismet.Akismet +import net.thauvin.erik.akismet.AkismetComment +import net.thauvin.erik.akismet.CommentType +import java.util.* +import kotlin.system.exitProcess + +fun main(args: Array) { + if (args.size == 1 && args[0].isNotEmpty()) { + val akismet = Akismet(apiKey = args[0], blog = "https://yourblogdomainname.com/blog/") + val comment = AkismetComment(userIp = "127.0.0.1", userAgent = "curl/7.29.0").apply { + isTest = true + referrer = "https://www.google.com" + permalink = "${akismet.blog}post=1" + type = CommentType.COMMENT + author = "admin" + authorEmail = "test@test.com" + authorUrl = "https://www.CheckOutMyCoolSite.com" + dateGmt = Akismet.dateToGmt(Date()) +// userRole = AkismetComment.ADMIN_ROLE + content = "It means a lot that you would take the time to review our software. Thanks again." + } + +// with(akismet.logger) { +// addHandler(ConsoleHandler().apply { level = Level.FINE }) +// level = Level.FINE +// } + + if (akismet.verifyKey()) { + val isSpam = akismet.checkComment(comment) + if (isSpam) { + println("The comment is SPAM according to Akismet.") + + val hasBeenSubmitted = akismet.submitSpam(comment) + + if (hasBeenSubmitted) { + println("The comment was successfully submitted as SPAM to Akismet.") + } else { + System.err.println(akismet.errorMessage) + } + } else { + println("The comment is not SPAM according to Akismet.") + + val hasBeenSubmitted = akismet.submitHam(comment) + + if (hasBeenSubmitted) { + println("The comment was successfully submitted as HAM to Akismet.") + } else { + System.err.println(akismet.errorMessage) + } + } + } else { + System.err.println("Invalid API Key.") + exitProcess(1) + } + + exitProcess(0) + } else { + System.err.println("Please specify an API key.") + exitProcess(1) + } +} diff --git a/examples/gradle/src/main/kotlin/com/example/AkismetServlet.kt b/examples/gradle/src/main/kotlin/com/example/AkismetServlet.kt new file mode 100644 index 0000000..7e47ec3 --- /dev/null +++ b/examples/gradle/src/main/kotlin/com/example/AkismetServlet.kt @@ -0,0 +1,60 @@ +package com.example + +import jakarta.servlet.ServletException +import jakarta.servlet.annotation.WebServlet +import jakarta.servlet.http.HttpServlet +import jakarta.servlet.http.HttpServletRequest +import jakarta.servlet.http.HttpServletResponse +import net.thauvin.erik.akismet.Akismet +import net.thauvin.erik.akismet.AkismetComment +import net.thauvin.erik.akismet.CommentType +import java.io.IOException +import java.util.* + +@WebServlet(description = "Akismet Servlet", displayName = "Akismet", urlPatterns = ["/comment/*"]) +class AkismetServlet : HttpServlet() { + private val akismet = Akismet("YOUR_API_KEY", "http://yourblogdomainname.com/blog/") + + @Throws(ServletException::class, IOException::class) + public override fun service(request: HttpServletRequest, response: HttpServletResponse) { + val id = request.getParameter("id") + + akismet.appUserAgent = request.servletContext.serverInfo + + val comment = AkismetComment(request).apply { + permalink = "${akismet.blog}/comment/$id" + type = CommentType.COMMENT + author = request.getParameter("name") + authorEmail = request.getParameter("email") + dateGmt = Akismet.dateToGmt(Date()) + content = request.getParameter("comment") + } + + val isSpam = akismet.checkComment(comment) + + saveComment( + id = id, + name = comment.author, + email = comment.authorEmail, + date = comment.dateGmt, + comment = comment.content, + json = comment.toJson(), + isSpam = isSpam + ) + + // ... + } + + @Suppress("UNUSED_PARAMETER") + private fun saveComment( + id: String, + name: String?, + email: String?, + date: String?, + comment: String?, + json: String, + isSpam: Boolean + ) { + // ... + } +} diff --git a/examples/gradle/wrapper/gradle-wrapper.jar b/examples/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7f93135..0000000 Binary files a/examples/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/examples/gradlew.bat b/examples/gradlew.bat deleted file mode 100644 index 93e3f59..0000000 --- a/examples/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index e69de29..0000000 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7f93135..0000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index ac72c34..0000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew deleted file mode 100755 index 0adc8e1..0000000 --- a/gradlew +++ /dev/null @@ -1,249 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar new file mode 100644 index 0000000..78344b7 Binary files /dev/null and b/lib/bld/bld-wrapper.jar differ diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties new file mode 100644 index 0000000..f9c4abb --- /dev/null +++ b/lib/bld/bld-wrapper.properties @@ -0,0 +1,11 @@ +bld.downloadExtensionJavadoc=false +bld.downloadExtensionSources=true +bld.downloadLocation= +bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.9 +bld.extension-dokka=com.uwyn.rife2:bld-dokka:1.0.3 +bld.extension-gv=com.uwyn.rife2:bld-generated-version:1.0.0 +bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.9 +bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.4 +bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES +bld.sourceDirectories= +bld.version=2.2.1 diff --git a/pom.xml b/pom.xml index ff49ef0..33a7c4f 100644 --- a/pom.xml +++ b/pom.xml @@ -1,14 +1,10 @@ - - - - - - + 4.0.0 net.thauvin.erik akismet-kotlin - 1.0.0 + 1.1.0-SNAPSHOT akismet-kotlin A client library for accessing the Automattic Kismet (Akismet) spam comments filtering service. https://github.com/ethauvin/akismet-kotlin @@ -18,6 +14,50 @@ https://opensource.org/licenses/BSD-3-Clause + + + org.jetbrains.kotlin + kotlin-stdlib + 2.1.20 + compile + + + org.jetbrains.kotlin + kotlin-stdlib-jdk7 + 2.1.20 + compile + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + 2.1.20 + compile + + + com.squareup.okhttp3 + okhttp + 4.12.0 + compile + + + com.squareup.okhttp3 + logging-interceptor + 4.12.0 + compile + + + org.jetbrains.kotlinx + kotlinx-serialization-json + 1.8.0 + compile + + + jakarta.servlet + jakarta.servlet-api + 6.1.0 + provided + + ethauvin @@ -31,57 +71,4 @@ scm:git:git@github.com:ethauvin/akismet-kotlin.git https://github.com/ethauvin/akismet-kotlin - - GitHub - https://github.com/ethauvin/akismet-kotlin/issues - - - - - org.jetbrains.kotlin - kotlin-bom - 1.9.10 - pom - import - - - - - - org.jetbrains.kotlin - kotlin-stdlib-jdk8 - 1.9.10 - compile - - - jakarta.servlet - jakarta.servlet-api - 6.0.0 - runtime - - - com.squareup.okhttp3 - okhttp - 4.11.0 - runtime - - - com.squareup.okio - okio-jvm - 3.5.0 - runtime - - - com.squareup.okhttp3 - logging-interceptor - 4.11.0 - runtime - - - org.jetbrains.kotlinx - kotlinx-serialization-json-jvm - 1.6.0 - runtime - - diff --git a/settings.gradle.kts b/settings.gradle.kts deleted file mode 100644 index f93566a..0000000 --- a/settings.gradle.kts +++ /dev/null @@ -1,18 +0,0 @@ -plugins { - id("com.gradle.enterprise").version("3.6.3") -} - -gradleEnterprise { - buildScan { - link("GitHub", "https://github.com/ethauvin/akismet-kotlin/tree/master") - if (!System.getenv("CI").isNullOrEmpty()) { - isUploadInBackground = false - publishOnFailure() - tag("CI") - } - termsOfServiceUrl = "https://gradle.com/terms-of-service" - termsOfServiceAgree = "yes" - } -} - -rootProject.name = "akismet-kotlin" diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..82098a0 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,7 @@ +sonar.organization=ethauvin-github +sonar.projectKey=ethauvin_akismet-kotlin +sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml +sonar.sources=src/main/kotlin/ +sonar.tests=src/test/kotlin/ +sonar.java.binaries=build/main,build/test +sonar.java.libraries=lib/compile/*.jar diff --git a/src/bld/java/net/thauvin/erik/AkismetBuild.java b/src/bld/java/net/thauvin/erik/AkismetBuild.java new file mode 100644 index 0000000..915396c --- /dev/null +++ b/src/bld/java/net/thauvin/erik/AkismetBuild.java @@ -0,0 +1,243 @@ +/* + * AkismetBuild.java + * + * Copyright 2019-2025 Erik C. Thauvin (erik@thauvin.net) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.thauvin.erik; + +import rife.bld.BuildCommand; +import rife.bld.Project; +import rife.bld.extension.*; +import rife.bld.extension.dokka.LoggingLevel; +import rife.bld.extension.dokka.OutputFormat; +import rife.bld.extension.dokka.SourceSet; +import rife.bld.extension.kotlin.CompileOptions; +import rife.bld.extension.kotlin.CompilerPlugin; +import rife.bld.operations.exceptions.ExitStatusException; +import rife.bld.publish.PomBuilder; +import rife.bld.publish.PublishDeveloper; +import rife.bld.publish.PublishLicense; +import rife.bld.publish.PublishScm; +import rife.tools.exceptions.FileUtilsErrorException; + +import java.io.File; +import java.io.IOException; +import java.util.List; +import java.util.logging.ConsoleHandler; +import java.util.logging.Level; +import java.util.logging.Logger; + +import static rife.bld.dependencies.Repository.*; +import static rife.bld.dependencies.Scope.*; + +public class AkismetBuild extends Project { + private static final String DETEKT_BASELINE = "config/detekt/baseline.xml"; + final File srcMainKotlin = new File(srcMainDirectory(), "kotlin"); + + public AkismetBuild() { + pkg = "net.thauvin.erik"; + name = "akismet-kotlin"; + version = version(1, 1, 0, "SNAPSHOT"); + + javaRelease = 11; + + downloadSources = true; + autoDownloadPurge = true; + repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL); + + var okHttp = version(4, 12, 0); + final var kotlin = version(2, 1, 20); + scope(compile) + .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin)) + .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk7", kotlin)) + .include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8", kotlin)) + .include(dependency("com.squareup.okhttp3", "okhttp", okHttp)) + .include(dependency("com.squareup.okhttp3", "logging-interceptor", okHttp)) + .include(dependency("org.jetbrains.kotlinx", "kotlinx-serialization-json", "1.8.0")); + scope(provided) + .include(dependency("jakarta.servlet", "jakarta.servlet-api", version(6, 1, 0))); + scope(test) + .include(dependency("org.mockito", "mockito-core", version(5, 16, 1))) + .include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin)) + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 1))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 1))) + .include(dependency("org.junit.platform", "junit-platform-launcher", version(1, 12, 1))) + .include(dependency("com.willowtreeapps.assertk", "assertk-jvm", version(0, 28, 1))); + + publishOperation() + .repository(version.isSnapshot() ? repository(SONATYPE_SNAPSHOTS_LEGACY.location()) + .withCredentials(property("sonatype.user"), property("sonatype.password")) + : repository(SONATYPE_RELEASES_LEGACY.location()) + .withCredentials(property("sonatype.user"), property("sonatype.password"))) + .repository(repository("github")) + .info() + .groupId(pkg) + .artifactId(name) + .description("A client library for accessing the Automattic Kismet (Akismet) spam comments filtering service.") + .url("https://github.com/ethauvin/" + name) + .developer(new PublishDeveloper() + .id("ethauvin") + .name("Erik C. Thauvin") + .email("erik@thauvin.net") + .url("https://erik.thauvin.net/") + ) + .license(new PublishLicense() + .name("BSD 3-Clause") + .url("https://opensource.org/licenses/BSD-3-Clause")) + .scm(new PublishScm() + .connection("scm:git:https://github.com/ethauvin/" + name + ".git") + .developerConnection("scm:git:git@github.com:ethauvin/" + name + ".git") + .url("https://github.com/ethauvin/" + name)) + .signKey(property("sign.key")) + .signPassphrase(property("sign.passphrase")); + + jarSourcesOperation().sourceDirectories(srcMainKotlin); + testOperation().javaOptions(List.of("-XX:+EnableDynamicAgentLoading")); + } + + public static void main(String[] args) { + // Enable detailed logging for the Kotlin extension + var level = Level.ALL; + var logger = Logger.getLogger("rife.bld.extension"); + var consoleHandler = new ConsoleHandler(); + + consoleHandler.setLevel(level); + logger.addHandler(consoleHandler); + logger.setLevel(level); + logger.setUseParentHandlers(false); + + new AkismetBuild().start(args); + } + + @BuildCommand(summary = "Compiles the Kotlin project") + @Override + public void compile() throws Exception { + genver(); + var options = new CompileOptions().verbose(true).jvmOptions("--enable-native-access=ALL-UNNAMED"); + var op = new CompileKotlinOperation() + .fromProject(this) + .compileOptions(options) + .plugins(CompilerPlugin.KOTLIN_SERIALIZATION); + op.execute(); + } + + @BuildCommand(summary = "Checks source with Detekt") + public void detekt() throws ExitStatusException, IOException, InterruptedException { + new DetektOperation() + .fromProject(this) + .baseline(DETEKT_BASELINE) + .execute(); + } + + @BuildCommand(value = "detekt-baseline", summary = "Creates the Detekt baseline") + public void detektBaseline() throws ExitStatusException, IOException, InterruptedException { + new DetektOperation() + .fromProject(this) + .baseline(DETEKT_BASELINE) + .createBaseline(true) + .execute(); + } + + @BuildCommand(summary = "Generates documentation in HTML format") + public void docs() throws ExitStatusException, IOException, InterruptedException { + new DokkaOperation() + .fromProject(this) + .loggingLevel(LoggingLevel.INFO) + .moduleName("Akismet Kotlin") + .moduleVersion(version.toString()) + .outputDir("docs") + .outputFormat(OutputFormat.HTML) + .sourceSet( + new SourceSet() + .src(srcMainKotlin) + .classpath(compileClasspathJars()) + .classpath(providedClasspathJars()) + .srcLink(srcMainKotlin, "https://github.com/ethauvin/" + name + + "/tree/master/src/main/kotlin/", "#L") + .includes("config/dokka/packages.md") + .jdkVersion(javaRelease) + .externalDocumentationLinks("https://jakarta.ee/specifications/platform/9/apidocs/", + "https://jakarta.ee/specifications/platform/9/apidocs/package-list") + + ) + .execute(); + } + + @BuildCommand(summary = "Generates version class") + public void genver() throws Exception { + new GeneratedVersionOperation() + .fromProject(this) + .projectName("Akismet Kotlin") + .packageName(pkg + ".akismet") + .classTemplate("version.txt") + .directory(srcMainKotlin) + .extension(".kt") + .execute(); + } + + @BuildCommand(summary = "Generates JaCoCo Reports") + public void jacoco() throws Exception { + new JacocoReportOperation() + .fromProject(this) + .sourceFiles(srcMainKotlin) + .execute(); + } + + @Override + public void javadoc() throws ExitStatusException, IOException, InterruptedException { + new DokkaOperation() + .fromProject(this) + .loggingLevel(LoggingLevel.INFO) + .moduleName("Bitly Shorten") + .moduleVersion(version.toString()) + .outputDir(new File(buildDirectory(), "javadoc")) + .outputFormat(OutputFormat.JAVADOC) + .globalLinks("https://jakarta.ee/specifications/platform/9/apidocs/", + "https://jakarta.ee/specifications/platform/9/apidocs/package-list") + .execute(); + } + + @Override + public void publish() throws Exception { + super.publish(); + pomRoot(); + } + + @Override + public void publishLocal() throws Exception { + super.publishLocal(); + pomRoot(); + } + + @BuildCommand(value = "pom-root", summary = "Generates the POM file in the root directory") + public void pomRoot() throws FileUtilsErrorException { + PomBuilder.generateInto(publishOperation().fromProject(this).info(), dependencies(), + new File(workDirectory, "pom.xml")); + } +} diff --git a/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt b/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt index c359415..1824f45 100644 --- a/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt +++ b/src/main/kotlin/net/thauvin/erik/akismet/Akismet.kt @@ -1,8 +1,7 @@ /* * Akismet.kt * - * Copyright (c) 2019-2022, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. + * Copyright 2019-2024 Erik C. Thauvin (erik@thauvin.net) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -32,7 +31,6 @@ package net.thauvin.erik.akismet import kotlinx.serialization.json.Json -import net.thauvin.erik.semver.Version import okhttp3.FormBody import okhttp3.HttpUrl import okhttp3.HttpUrl.Companion.toHttpUrl @@ -45,7 +43,7 @@ import java.time.OffsetDateTime import java.time.ZoneId import java.time.format.DateTimeFormatter import java.time.temporal.ChronoUnit -import java.util.Date +import java.util.* import java.util.logging.Level import java.util.logging.Logger @@ -54,7 +52,6 @@ import java.util.logging.Logger * * @constructor Creates a new instance using the provided [Akismet](https://www.askimet.com/) API key. */ -@Version(properties = "version.properties", type = "kt") open class Akismet(apiKey: String) { companion object { /** @@ -64,7 +61,7 @@ open class Akismet(apiKey: String) { */ @JvmStatic fun jsonComment(json: String): AkismetComment { - return Json.decodeFromString(AkismetComment.serializer(), json) + return Json.decodeFromString(json) } /** @@ -135,7 +132,6 @@ open class Akismet(apiKey: String) { /** * The [HTTP status code](https://www.restapitutorial.com/httpstatuscodes.html) of the last operation. */ - @Suppress("MemberVisibilityCanBePrivate") var httpStatusCode: Int = 0 private set @@ -144,7 +140,6 @@ open class Akismet(apiKey: String) { * * For example: `true`, `false`, `valid`, `invalid`, etc. */ - @Suppress("MemberVisibilityCanBePrivate") var response: String = "" private set @@ -168,7 +163,6 @@ open class Akismet(apiKey: String) { * * @see [Akismet.isDiscard] */ - @Suppress("MemberVisibilityCanBePrivate") var proTip: String = "" private set @@ -180,7 +174,6 @@ open class Akismet(apiKey: String) { * * @see [Akismet.proTip] */ - @Suppress("MemberVisibilityCanBePrivate") var isDiscard: Boolean = false private set @@ -402,8 +395,8 @@ open class Akismet(apiKey: String) { if (!permalink.isNullOrBlank()) { add("permalink", permalink.toString()) } - if (!type.isNullOrBlank()) { - add("comment_type", type.toString()) + if (type != CommentType.NONE) { + add("comment_type", type.value) } if (!author.isNullOrBlank()) { add("comment_author", author.toString()) diff --git a/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt b/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt index 245108d..400fc7e 100644 --- a/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt +++ b/src/main/kotlin/net/thauvin/erik/akismet/AkismetComment.kt @@ -1,8 +1,7 @@ /* * AkismetComment.kt * - * Copyright (c) 2019-2022, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. + * Copyright 2019-2024 Erik C. Thauvin (erik@thauvin.net) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -58,49 +57,24 @@ private fun String?.ifNull() = this ?: "" */ @Serializable open class AkismetComment(val userIp: String, val userAgent: String) { - @Suppress("unused") companion object { - /** A blog comment. */ - const val TYPE_COMMENT = "comment" - - /** A top-level forum post. */ - const val TYPE_FORUM_POST = "forum-post" - - /** A reply to a top-level forum post. */ - const val TYPE_REPLY = "reply" - - /** A blog post. */ - const val TYPE_BLOG_POST = "blog-post" - - /** A contact form or feedback form submission. */ - const val TYPE_CONTACT_FORM = "contact-form" - - /** A new user account. */ - const val TYPE_SIGNUP = "signup" - - /** A message sent between just a few users. */ - const val TYPE_MESSAGE = "message" - - /** A pingback. */ - const val TYPE_PINGBACK = "pingback" - - /** A trackback. */ - const val TYPE_TRACKBACK = "trackback" - - /** A Twitter message. */ - const val TYPE_TWEET = "tweet" - - /** Administrator role. If used, Akismet will always return false. */ + /** + * Administrator role. If used, Akismet will always return `false`. + */ const val ADMIN_ROLE = "administrator" } - /** The content of the referer header should be set here. */ + /** + * The content of the referer header should be set here. + */ var referrer: String? = "" set(value) { field = value.ifNull() } - /** The full permanent URL of the entry the comment was submitted to. */ + /** + * The full permanent URL of the entry the comment was submitted to. + */ var permalink: String? = "" set(value) { field = value.ifNull() @@ -109,45 +83,50 @@ open class AkismetComment(val userIp: String, val userAgent: String) { /** * A string that describes the type of content being sent, such as: * - * - [TYPE_COMMENT] - * - [TYPE_FORUM_POST] - * - [TYPE_REPLY] - * - [TYPE_BLOG_POST] - * - [TYPE_CONTACT_FORM] - * - [TYPE_SIGNUP] - * - [TYPE_MESSAGE] - * - [TYPE_PINGBACK] - * - [TYPE_TRACKBACK] - * - [TYPE_TWEET] + * - [CommentType.COMMENT] + * - [CommentType.FORUM_POST] + * - [CommentType.REPLY] + * - [CommentType.BLOG_POST] + * - [CommentType.CONTACT_FORM] + * - [CommentType.SIGNUP] + * - [CommentType.MESSAGE] + * - [CommentType.PINGBACK] + * - [CommentType.TRACKBACK] + * - [CommentType.TWEET] * * 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/). */ - var type: String? = "" - set(value) { - field = value.ifNull() - } + var type: CommentType = CommentType.NONE - /** Name submitted with the comment. */ + /** + * Name submitted with the comment. + */ var author: String? = "" set(value) { field = value.ifNull() } - /** Email address submitted with the comment. */ + /** + * Email address submitted with the comment. + */ var authorEmail: String? = "" set(value) { field = value.ifNull() } - /** URL submitted with comment. */ + /** + * URL submitted with comment. + */ var authorUrl: String? = "" set(value) { field = value.ifNull() } - /** The content that was submitted. */ + /** + * The content that was submitted. + */ var content: String? = "" set(value) { field = value.ifNull() @@ -196,14 +175,16 @@ open class AkismetComment(val userIp: String, val userAgent: String) { /** * The user role of the user who submitted the comment. This is an optional parameter. * - * If you set it to [ADMIN_ROLE], Akismet will always return false. + * If you set it to [ADMIN_ROLE], Akismet will always return `false`. */ var userRole: String? = "" set(value) { field = value.ifNull() } - /** This is an optional parameter. You can use it when submitting test queries to Akismet. */ + /** + * This is an optional parameter. You can use it when submitting test queries to Akismet. + */ var isTest: Boolean = false /** @@ -232,8 +213,7 @@ open class AkismetComment(val userIp: String, val userAgent: String) { * Creates a new instance extracting the [userIp], [userAgent], [referrer] and [serverEnv] environment variables * from a Servlet request. * - * See the - * [Akismet API](https://akismet.com/development/api/#comment-check) for more details. + * See the [Akismet API](https://akismet.com/development/api/#comment-check) for more details. * * @see [serverEnv] */ @@ -245,6 +225,24 @@ open class AkismetComment(val userIp: String, val userAgent: String) { serverEnv = buildServerEnv(request) } + constructor(config: CommentConfig) : this(config.userIp, config.userAgent) { + referrer = config.referrer + permalink = config.permalink + type = config.type + author = config.author + authorEmail = config.authorEmail + authorUrl = config.authorUrl + content = config.content + dateGmt = config.dateGmt + postModifiedGmt = config.postModifiedGmt + blogLang = config.blogLang + blogCharset = config.blogCharset + userRole = config.userRole + isTest = config.isTest + recheckReason = config.recheckReason + serverEnv = config.serverEnv + } + /** * Returns a JSON representation of the comment. * diff --git a/src/main/kotlin/net/thauvin/erik/akismet/CommentConfig.kt b/src/main/kotlin/net/thauvin/erik/akismet/CommentConfig.kt new file mode 100644 index 0000000..53b9295 --- /dev/null +++ b/src/main/kotlin/net/thauvin/erik/akismet/CommentConfig.kt @@ -0,0 +1,203 @@ +/* + * CommentConfig.kt + * + * Copyright 2019-2024 Erik C. Thauvin (erik@thauvin.net) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.thauvin.erik.akismet + +/** + * Provides a comment configuration. + */ +class CommentConfig private constructor(builder: Builder) { + val userIp: String = builder.userIp + val userAgent: String = builder.userAgent + val referrer = builder.referrer + val permalink = builder.permalink + val type = builder.type + val author = builder.author + val authorEmail = builder.authorEmail + val authorUrl = builder.authorUrl + val content = builder.content + val dateGmt = builder.dateGmt + val postModifiedGmt = builder.postModifiedGmt + val blogLang = builder.blogLang + val blogCharset = builder.blogCharset + val userRole = builder.userRole + val isTest = builder.isTest + val recheckReason = builder.recheckReason + val serverEnv = builder.serverEnv + + /** + * Provides a configuration builder. + * + * @param userIp IP address of the comment submitter. + * @param userAgent User agent string of the web browser submitting the comment. + */ + data class Builder(var userIp: String, var userAgent: String) { + var referrer = "" + var permalink = "" + var type: CommentType = CommentType.NONE + var author = "" + var authorEmail = "" + var authorUrl = "" + var content = "" + var dateGmt = "" + var postModifiedGmt = "" + var blogLang = "" + var blogCharset = "" + var userRole = "" + var isTest = false + var recheckReason = "" + var serverEnv: Map = emptyMap() + + /** + * Sets the IP address of the comment submitter. + */ + fun userIp(userIp: String): Builder = apply { this.userIp = userIp } + + /** + * Sets the user agent string of the web browser submitting the comment. + */ + fun userAgent(userAgent: String): Builder = apply { this.userAgent = userAgent } + + /** + * Sets the content of the referrer header. + */ + fun referrer(referrer: String): Builder = apply { this.referrer = referrer } + + /** + * Sets the full permanent URL of the entry the comment was submitted to. + */ + fun permalink(permalink: String): Builder = apply { this.permalink = permalink } + + /** + * Sets a string that describes the type of content being sent, such as: + * + * - [CommentType.COMMENT] + * - [CommentType.FORUM_POST] + * - [CommentType.REPLY] + * - [CommentType.BLOG_POST] + * - [CommentType.CONTACT_FORM] + * - [CommentType.SIGNUP] + * - [CommentType.MESSAGE] + * - [CommentType.PINGBACK] + * - [CommentType.TRACKBACK] + * - [CommentType.TWEET] + * + * 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/). + */ + fun type(type: CommentType): Builder = apply { this.type = type } + + /** + * Sets the mame submitted with the comment. + */ + fun author(author: String): Builder = apply { this.author = author } + + /** + * Sets the email address submitted with the comment. + */ + fun authorEmail(authorEmail: String): Builder = apply { this.authorEmail = authorEmail } + + /** + * Sets the URL submitted with comment. + */ + fun authorUrl(authorUrl: String): Builder = apply { this.authorUrl = authorUrl } + + /** + * Sets the content that was submitted. + */ + fun content(content: String): Builder = apply { this.content = content } + + /** + * Sets 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 [Akismet.dateToGmt] + */ + fun dateGmt(dateGmt: String): Builder = apply { this.dateGmt = dateGmt } + + /** + * Sets the UTC timestamp of the publication time for the post, page or thread on which the comment was posted. + * + * @see [Akismet.dateToGmt] + */ + fun postModifiedGmt(postModifiedGmt: String): Builder = apply { this.postModifiedGmt = postModifiedGmt } + + /** + * 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` + */ + fun blogLang(blogLang: String): Builder = apply { this.blogLang = blogLang } + + /** + * Sets the character encoding for the form values included in comment parameters, such as UTF-8 or ISO-8859-1 + */ + fun blogCharset(blogCharset: String): Builder = apply { this.blogCharset = blogCharset } + + /** + * Set the user role of the user who submitted the comment. This is an optional parameter. + * + * If you set it to [AkismetComment.ADMIN_ROLE], Akismet will always return `false`. + */ + fun userRole(userRole: String): Builder = apply { this.userRole = userRole } + + /** + * This is optional. You can set it when submitting test queries to Akismet. + */ + fun isTest(isTest: Boolean): Builder = apply { this.isTest = isTest } + + /** + * 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` + */ + fun recheckReason(checkReason: String): Builder = apply { this.recheckReason = checkReason } + + /** + * 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. + */ + fun serverEnv(serverEnv: Map): Builder = apply { this.serverEnv = serverEnv } + + /** + * Builds a new comment configuration. + */ + fun build(): CommentConfig = CommentConfig(this) + } +} diff --git a/src/main/kotlin/net/thauvin/erik/akismet/CommentType.kt b/src/main/kotlin/net/thauvin/erik/akismet/CommentType.kt new file mode 100644 index 0000000..b05ef07 --- /dev/null +++ b/src/main/kotlin/net/thauvin/erik/akismet/CommentType.kt @@ -0,0 +1,107 @@ +/* + * CommentType.kt + * + * Copyright 2019-2024 Erik C. Thauvin (erik@thauvin.net) + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of this project nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.thauvin.erik.akismet + +import kotlinx.serialization.Serializable + +/** + * Defines the comment types. + */ +@Serializable +data class CommentType(var value: String) { + companion object { + /** + * A blog comment. + */ + @JvmField + val COMMENT = CommentType("comment") + + /** + * A top-level forum post. + */ + @JvmField + val FORUM_POST = CommentType("forum-post") + + /** + * A reply to a top-level forum post. + */ + @JvmField + val REPLY = CommentType("reply") + + /** + * A blog post. + */ + @JvmField + val BLOG_POST = CommentType("blog-post") + + /** + * A contact form or feedback form submission. + */ + @JvmField + val CONTACT_FORM = CommentType("contact-form") + + /** A new user account. + */ + @JvmField + val SIGNUP = CommentType("signup") + + /** + * A message sent between just a few users. + */ + @JvmField + val MESSAGE = CommentType("message") + + /** + * A pingback. + */ + @JvmField + val PINGBACK = CommentType("pingback") + + /** + * A trackback. + */ + @JvmField + val TRACKBACK = CommentType("trackback") + + /** + * A Twitter message. + */ + @JvmField + val TWEET = CommentType("tweet") + + /** + * Undefined type. + */ + @JvmField + val NONE = CommentType("") + } +} diff --git a/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt b/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt new file mode 100644 index 0000000..7ffc8c4 --- /dev/null +++ b/src/main/kotlin/net/thauvin/erik/akismet/GeneratedVersion.kt @@ -0,0 +1,14 @@ +/** + * This file is automatically generated. + * Do not modify! -- ALL CHANGES WILL BE ERASED! + */ + +package net.thauvin.erik.akismet + +/** + * Provides semantic version information. + */ + internal object GeneratedVersion { + const val PROJECT = "Akismet Kotlin" + const val VERSION = "1.1.0-SNAPSHOT" +} diff --git a/src/test/kotlin/net/thauvin/erik/akismet/AkismetTest.kt b/src/test/kotlin/net/thauvin/erik/akismet/AkismetTest.kt index 5195339..8741a43 100644 --- a/src/test/kotlin/net/thauvin/erik/akismet/AkismetTest.kt +++ b/src/test/kotlin/net/thauvin/erik/akismet/AkismetTest.kt @@ -1,8 +1,7 @@ /* * AkismetTest.kt * - * Copyright (c) 2019-2022, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. + * Copyright 2019-2024 Erik C. Thauvin (erik@thauvin.net) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -34,36 +33,27 @@ package net.thauvin.erik.akismet import assertk.all import assertk.assertThat -import assertk.assertions.contains -import assertk.assertions.isEmpty -import assertk.assertions.isEqualTo -import assertk.assertions.isFalse -import assertk.assertions.isNotEmpty -import assertk.assertions.isTrue -import assertk.assertions.key -import assertk.assertions.prop -import assertk.assertions.size +import assertk.assertions.* import jakarta.servlet.http.HttpServletRequest import okhttp3.FormBody import okhttp3.HttpUrl.Companion.toHttpUrl +import org.junit.Assert.assertThrows +import org.junit.BeforeClass +import org.junit.jupiter.api.Test import org.mockito.Mockito import org.mockito.Mockito.`when` -import org.testng.Assert.assertEquals -import org.testng.Assert.assertFalse -import org.testng.Assert.assertNotEquals -import org.testng.Assert.assertTrue -import org.testng.Assert.expectThrows -import org.testng.annotations.BeforeClass -import org.testng.annotations.Test import java.io.File import java.io.FileInputStream import java.time.LocalDateTime import java.time.ZoneId -import java.util.Collections -import java.util.Date -import java.util.Properties +import java.util.* import java.util.logging.ConsoleHandler import java.util.logging.Level +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertNotEquals +import kotlin.test.assertTrue + fun getKey(key: String): String { var value = System.getenv(key) ?: "" @@ -88,90 +78,51 @@ fun getKey(key: String): String { * AKISMET_API_KEY and AKISMET_BLOG should be in env vars or local.properties */ class AkismetTest { - private val apiKey = getKey("AKISMET_API_KEY") - private val blog = getKey("AKISMET_BLOG") - private val referer = "http://www.google.com" - private val date = Date() - private val comment = AkismetComment( - userIp = "127.0.0.1", - userAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" - ) - private val akismet = Akismet(apiKey, blog) - private val mockComment: AkismetComment = AkismetComment(request = getMockRequest()) private val emptyFormBody = FormBody.Builder().build() - @BeforeClass - fun beforeClass() { - with(akismet.logger) { - addHandler(ConsoleHandler().apply { level = Level.FINE }) - level = Level.FINE - } - - with(comment) { - referrer = referer - permalink = "http://yourblogdomainname.com/blog/post=1" - type = AkismetComment.TYPE_COMMENT - author = "admin" - authorEmail = "test@test.com" - authorUrl = "http://www.CheckOutMyCoolSite.com" - content = "It means a lot that you would take the time to review our software. Thanks again." - dateGmt = Akismet.dateToGmt(date) - postModifiedGmt = dateGmt - blogLang = "en" - blogCharset = "UTF-8" - userRole = AkismetComment.ADMIN_ROLE - isTest = true - } - - akismet.logger.info(comment.toString()) - - with(mockComment) { - permalink = comment.permalink - type = comment.type - authorEmail = comment.authorEmail - author = comment.author - authorUrl = comment.authorUrl - content = comment.content - dateGmt = comment.dateGmt - postModifiedGmt = comment.dateGmt - blogLang = comment.blogLang - blogCharset = comment.blogCharset - userRole = comment.userRole - recheckReason = "edit" - isTest = true - } - - akismet.logger.info(mockComment.toJson()) - } - @Test fun constructorsTest() { - expectThrows(IllegalArgumentException::class.java) { + assertThrows( + IllegalArgumentException::class.java + ) { Akismet("") } - expectThrows(IllegalArgumentException::class.java) { + assertThrows( + IllegalArgumentException::class.java + ) { Akismet("1234") } - expectThrows(IllegalArgumentException::class.java) { + assertThrows( + IllegalArgumentException::class.java + ) { Akismet("123456789 12") } - expectThrows(IllegalArgumentException::class.java) { + assertThrows( + IllegalArgumentException::class.java + ) { Akismet("123456789012", "") } - expectThrows(IllegalArgumentException::class.java) { + assertThrows( + IllegalArgumentException::class.java + ) { Akismet("1234", "foo") } } @Test fun blogPropertyTest() { - expectThrows(IllegalArgumentException::class.java) { + assertThrows(IllegalArgumentException::class.java) { akismet.blog = "" } assertThat(akismet::blog).isEqualTo(blog) } + @Test + fun validateConfigTest() { + assertThat(AkismetComment(config) == comment).isTrue() + } + @Test fun verifyKeyTest() { assertThat(akismet, "akismet").all { @@ -208,16 +159,17 @@ class AkismetTest { @Test fun emptyCommentTest() { - expectThrows(IllegalArgumentException::class.java) { - akismet.checkComment(AkismetComment("", "")) - } + assertThrows( + java.lang.IllegalArgumentException::class.java + ) { akismet.checkComment(AkismetComment("", "")) } + val empty = AkismetComment("", "") assertThat(empty, "AkismetComment(empty)").all { prop(AkismetComment::isTest).isFalse() prop(AkismetComment::referrer).isEqualTo("") prop(AkismetComment::permalink).isEqualTo("") - prop(AkismetComment::type).isEqualTo("") + prop(AkismetComment::type).isEqualTo(CommentType.NONE) prop(AkismetComment::authorEmail).isEqualTo("") prop(AkismetComment::author).isEqualTo("") prop(AkismetComment::authorUrl).isEqualTo("") @@ -231,11 +183,11 @@ class AkismetTest { prop(AkismetComment::serverEnv).size().isEqualTo(0) } - with(empty) { + with(receiver = empty) { for (s in listOf("test", "", null)) { referrer = s permalink = s - type = s + if (s != null) type = CommentType(s) authorEmail = s author = s authorUrl = s @@ -252,7 +204,7 @@ class AkismetTest { assertThat(empty, "AkismetComment($s)").all { prop(AkismetComment::referrer).isEqualTo(expected) prop(AkismetComment::permalink).isEqualTo(expected) - prop(AkismetComment::type).isEqualTo(expected) + prop(AkismetComment::type).isEqualTo(CommentType(expected)) prop(AkismetComment::authorEmail).isEqualTo(expected) prop(AkismetComment::author).isEqualTo(expected) prop(AkismetComment::authorUrl).isEqualTo(expected) @@ -308,6 +260,7 @@ class AkismetTest { emptyFormBody ) ) + assertThat(akismet, "executeMethod(pro-tip)").all { prop(Akismet::proTip).isEqualTo("discard") prop(Akismet::isDiscard).isTrue() @@ -358,9 +311,12 @@ class AkismetTest { } } - @Test(expectedExceptions = [IllegalArgumentException::class]) + @Test fun invalidApiTest() { - akismet.executeMethod("https://.com".toHttpUrl(), emptyFormBody) + assertThrows( + java.lang.IllegalArgumentException::class.java + ) { akismet.executeMethod("https://.com".toHttpUrl(), emptyFormBody) } + } @Test @@ -395,7 +351,7 @@ class AkismetTest { jsonComment.recheckReason = "" assertNotEquals(jsonComment, mockComment, "jsonComment != jsonComment") - assertNotEquals(this, comment, "this != comment") + assertThat(this, "this != comment").isNotEqualTo(comment) } @Test @@ -415,19 +371,95 @@ class AkismetTest { assertThat(comment::dateGmt).isEqualTo(utcDate) } - private fun getMockRequest(): HttpServletRequest { - val request = Mockito.mock(HttpServletRequest::class.java) - with(request) { - `when`(remoteAddr).thenReturn(comment.userIp) - `when`(requestURI).thenReturn("/blog/post=1") - `when`(getHeader("referer")).thenReturn(referer) - `when`(getHeader("Cookie")).thenReturn("name=value; name2=value2; name3=value3") - `when`(getHeader("User-Agent")).thenReturn(comment.userAgent) - `when`(getHeader("Accept-Encoding")).thenReturn("gzip") - `when`(headerNames).thenReturn( - Collections.enumeration(listOf("User-Agent", "referer", "Cookie", "Accept-Encoding", "Null")) - ) + companion object { + private const val REFERER = "http://www.google.com" + private val apiKey = getKey("AKISMET_API_KEY") + private val blog = getKey("AKISMET_BLOG") + private val akismet = Akismet(apiKey, blog) + private val comment = AkismetComment( + userIp = "127.0.0.1", + userAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6" + ) + private val date = Date() + private val config = CommentConfig.Builder(comment.userIp, comment.userAgent) + .referrer(REFERER) + .permalink("http://yourblogdomainname.com/blog/post=1") + .type(CommentType.COMMENT) + .author("admin") + .authorEmail("test@test.com") + .authorUrl("http://www.CheckOutMyCoolSite.com") + .content("It means a lot that you would take the time to review our software. Thanks again.") + .dateGmt(Akismet.dateToGmt(date)) + .postModifiedGmt(Akismet.dateToGmt(date)) + .blogLang("en") + .blogCharset("UTF-8") + .userRole(AkismetComment.ADMIN_ROLE) + .recheckReason("edit") + .isTest(true) + .build() + private val mockComment: AkismetComment = AkismetComment(request = getMockRequest()) + + init { + with(comment) { + referrer = config.referrer + permalink = config.permalink + type = CommentType("comment") + author = config.author + authorEmail = config.authorEmail + authorUrl = config.authorUrl + content = config.content + dateGmt = config.dateGmt + postModifiedGmt = config.postModifiedGmt + blogLang = config.blogLang + blogCharset = config.blogCharset + userRole = config.userRole + recheckReason = config.recheckReason + isTest = config.isTest + } + + with(mockComment) { + permalink = comment.permalink + type = comment.type + authorEmail = comment.authorEmail + author = comment.author + authorUrl = comment.authorUrl + content = comment.content + dateGmt = comment.dateGmt + postModifiedGmt = comment.dateGmt + blogLang = comment.blogLang + blogCharset = comment.blogCharset + userRole = AkismetComment.ADMIN_ROLE + recheckReason = comment.recheckReason + isTest = true + } + } + + @JvmStatic + @BeforeClass + fun beforeClass() { + with(akismet.logger) { + addHandler(ConsoleHandler().apply { level = Level.FINE }) + level = Level.FINE + } + + akismet.logger.info(comment.toString()) + akismet.logger.info(mockComment.toJson()) + } + + private fun getMockRequest(): HttpServletRequest { + val request = Mockito.mock(HttpServletRequest::class.java) + with(request) { + `when`(remoteAddr).thenReturn(comment.userIp) + `when`(requestURI).thenReturn("/blog/post=1") + `when`(getHeader("referer")).thenReturn(REFERER) + `when`(getHeader("Cookie")).thenReturn("name=value; name2=value2; name3=value3") + `when`(getHeader("User-Agent")).thenReturn(comment.userAgent) + `when`(getHeader("Accept-Encoding")).thenReturn("gzip") + `when`(headerNames).thenReturn( + Collections.enumeration(listOf("User-Agent", "referer", "Cookie", "Accept-Encoding", "Null")) + ) + } + return request } - return request } } diff --git a/version.mustache b/version.mustache deleted file mode 100644 index 34a4442..0000000 --- a/version.mustache +++ /dev/null @@ -1,18 +0,0 @@ -/* -* This file is automatically generated. -* Do not modify! -- ALL CHANGES WILL BE ERASED! -*/ - -package {{packageName}} - -/** -* Provides semantic version information. -* -* @author Semantic Version Annotation Processor -*/ -internal object {{className}} { - @JvmField - val PROJECT = "{{project}}" - @JvmField - val VERSION = "{{version}}" -} diff --git a/version.properties b/version.properties deleted file mode 100644 index 056f575..0000000 --- a/version.properties +++ /dev/null @@ -1,9 +0,0 @@ -#Generated by the Semver Plugin for Gradle -#Sun May 02 22:00:05 PDT 2021 -version.buildmeta= -version.major=1 -version.minor=0 -version.patch=0 -version.prerelease= -version.project=Akismet Kotlin -version.semver=1.0.0 diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..241bbe2 --- /dev/null +++ b/version.txt @@ -0,0 +1,14 @@ +/** + * This file is automatically generated. + * Do not modify! -- ALL CHANGES WILL BE ERASED! + */ + +package {{v packageName/}} + +/** + * Provides semantic version information. + */ + internal object {{v className/}} { + const val PROJECT = "{{v project/}}" + const val VERSION = "{{v version/}}" +}