Key Features
🌍
Multiplatform First
Share your MyAnimeList integration code seamlessly across Android, iOS, Desktop, WebAssembly, and JS targets.
🔒
OAuth2 & PKCE
Built-in user authorization, automatic token refresh, and encrypted persistence support via KSafe.
🎯
Type-Safe Fields
Request exact fields (such as AnimeField.TITLE and AnimeField.MEAN) to optimize payload sizes.
⚡
Async Coroutines
Powered by Ktor HTTP client and Kotlin coroutines with resilient JSON serialization.
Simple & Expressive API
Koani makes querying MyAnimeList data intuitive. Configure credentials with the KoaniClient DSL, specify the fields your UI needs, and execute requests asynchronously.
Built with defensive JSON parsing so your application remains unaffected when MyAnimeList adds new fields to API responses.
// 1. Initialize KoaniClient
val client = KoaniClient(clientId = "YOUR_CLIENT_ID")
// 2. Fetch anime details requesting only TITLE and MEAN fields
val anime = client.anime.getAnimeDetails(
animeId = 5114,
fields = listOf(
AnimeField.TITLE,
AnimeField.MEAN
)
)
println("${anime.title} — Score: ${anime.mean}")