Original project is archived, I will be maintaining this fork to the point where it works
API wrapper for Jikan API build using Kotlin + Kotlin DSL + Coroutines power 🚀
with Gradle
repositories {
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.GSculerlor:JikanKt:1.3.2'
}
with Maven
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.GSculerlor</groupId>
<artifactId>JikanKt</artifactId>
<version>1.3.2</version>
</dependency>
fun main() {
runBlocking {
val anime = JikanKt.getAnime(38992)
println(anime)
}
//Using custom domain
runBlocking {
val manga = JikanKt.apply { restClient = RestClient(url = "https://jikan.melijn.com/public/v3/") }.getManga(2)
println(manga)
}
}
Note that JikanKt
is an object, so it's singleton. So apply { }
will be applied on every request. If you have to request
to multiple domains, make sure to apply it per-request!
For documentation, please check here.
For latest release or to check the changelogs, please check Release tab.
JikanKt is under heavily development after revived from eternal slumber. At this point, some of the endpoints maybe still not wrapped yet, so please stay tune! Also currently it only run on JVM, but don't worry, Kotlin multiplatform is already planned on next major release! Also test will added once all of the endpoint is mapped which is very very soon!
Want to help? I'm very open to contributors so just do it or contact me if you have any question (Discord: Ganen#0124)