Skip to content

An async Kotlin wrapper around Meilisearch API

License

Notifications You must be signed in to change notification settings

nemoengineering/meilisearch-kotlin

Repository files navigation

Meilisearch Kotlin Client

CD/CI Workflow

A Kotlin wrapper around Meilisearch REST API. This library uses Ktor Client and KotlinX Serialization under the hood in order to provide an async typed client for Meilisearch v1.

Installation

This library is currently available through JitPack.

In order to use the library, add first the JitPack repository to the repositories block and then the dependency to the dependencies block:

repositories {
    maven("https://jitpack.io")
}

dependencies {
    implementation("com.github.nemoengineering:meilisearch-kotlin:0.5.0")
}

Usage

In order to interact with the Meilisearch you need to first instantiate a client which can then be used to perform the operations supported by the API:

val client = Meilisearch {
    port = 7700
    host = "localhost"
    apiKey = "my-api-key" // optional
}

val response: List<IndexResponse> = client.listIndexes()