|
| 1 | +<p align="center"> |
| 2 | + <a href="https://www.algolia.com"> |
| 3 | + <img alt="Algolia for Kotlin" src="https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/kotlin.png" > |
| 4 | + </a> |
| 5 | + |
| 6 | +<h4 align="center">The perfect starting point to integrate <a href="https://algolia.com" target="_blank">Algolia</a> within your Kotlin project</h4> |
| 7 | + |
| 8 | + <p align="center"> |
| 9 | + <a href="https://search.maven.org/search?q=a:algoliasearch-client-kotlin"><img src="https://img.shields.io/maven-central/v/com.algolia/algoliasearch-client-kotlin?label=Download" alt="Latest version"></img></a> |
| 10 | + <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="Licence"></img></a> |
| 11 | + </p> |
| 12 | +</p> |
| 13 | + |
| 14 | +<p align="center"> |
| 15 | + <a href="https://www.algolia.com/doc/api-client/getting-started/install/kotlin/" target="_blank">Documentation</a> • |
| 16 | + <a href="https://discourse.algolia.com" target="_blank">Community Forum</a> • |
| 17 | + <a href="http://stackoverflow.com/questions/tagged/algolia" target="_blank">Stack Overflow</a> • |
| 18 | + <a href="https://github.com/algolia/algoliasearch-client-kotlin/issues" target="_blank">Report a bug</a> • |
| 19 | + <a href="https://www.algolia.com/doc/api-client/troubleshooting/faq/kotlin/" target="_blank">FAQ</a> • |
| 20 | + <a href="https://www.algolia.com/support" target="_blank">Support</a> |
| 21 | +</p> |
| 22 | + |
| 23 | +## ✨ Features |
| 24 | + |
| 25 | +- The Kotlin client is compatible with Kotlin `1.6` and higher. |
| 26 | +- It is compatible with Kotlin project on the JVM, such as backend and Android applications. |
| 27 | +- It relies on the open source Kotlin libraries for seamless integration into Kotlin projects: |
| 28 | + - [Kotlin multiplatform](https://kotlinlang.org/docs/reference/multiplatform.html). |
| 29 | + - [Kotlinx serialization](https://github.com/Kotlin/kotlinx.serialization) for json parsing. |
| 30 | + - [Kotlinx coroutines](https://github.com/Kotlin/kotlinx.coroutines) for asynchronous operations. |
| 31 | + - [Ktor](https://github.com/ktorio/ktor) HTTP client. |
| 32 | +- The Kotlin client integrates the actual Algolia documentation in each source file: Request parameters, response fields, methods and concepts; all are documented and link to the corresponding url of the Algolia doc website. |
| 33 | +- The client is thread-safe. You can use `SearchClient`, `AnalyticsClient`, and `InsightsClient` in a multithreaded environment. |
| 34 | + |
| 35 | +## 💡 Getting Started |
| 36 | + |
| 37 | +Install the Kotlin client by adding the following dependency to your `gradle.build` file: |
| 38 | + |
| 39 | + ```gradle |
| 40 | + repositories { |
| 41 | + mavenCentral() |
| 42 | + } |
| 43 | + |
| 44 | + dependencies { |
| 45 | + implementation "com.algolia:algoliasearch-client-kotlin:$version" |
| 46 | + } |
| 47 | + ``` |
| 48 | +Also, choose and add to your dependencies one of [Ktor http client engines](https://ktor.io/docs/http-client-engines.html). |
| 49 | +Alternatively, you can use [algoliasearch-client-kotlin-bom](/client-bom). |
| 50 | +For full documentation, visit the **[Algolia Kotlin API Client](https://www.algolia.com/doc/api-client/getting-started/install/kotlin/)**. |
| 51 | + |
| 52 | +### Guides |
| 53 | + |
| 54 | +- [Getting started](https://github.com/algolia/algoliasearch-client-kotlin/tree/master/docs/GettingStarted.md) |
| 55 | +- [DSL](https://github.com/algolia/algoliasearch-client-kotlin/tree/master/docs/DSL.md) |
| 56 | +- [Serialization](https://github.com/algolia/algoliasearch-client-kotlin/tree/master/docs/Serialization.md) |
| 57 | +- [ExceptionHandling](https://github.com/algolia/algoliasearch-client-kotlin/tree/master/docs/ExceptionHandling.md) |
| 58 | +- [Configure the HTTP client](https://github.com/algolia/algoliasearch-client-kotlin/tree/master/docs/HTTPClient.md) |
| 59 | + |
| 60 | +## ❓ Troubleshooting |
| 61 | + |
| 62 | +Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/api-client/troubleshooting/faq/kotlin/) where you will find answers for the most common issues and gotchas with the client. |
| 63 | + |
| 64 | +## Use the Dockerfile |
| 65 | + |
| 66 | +If you want to contribute to this project without installing all its dependencies, you can use our Docker image. Please check our [dedicated guide](DOCKER_README.md) to learn more. |
| 67 | + |
| 68 | +## 📄 License |
| 69 | + |
| 70 | +Algolia Kotlin API Client is an open-sourced software licensed under the [MIT license](LICENSE). |
0 commit comments