Danbooru, yande.re and konachan client for kotlin
Add the dependency and the required dependencies
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_corroutines_version") // required
implementation("io.github.magonxesp:booru-client:1.0.0")Search by tag on Konachan for example.
import io.github.magonxesp.booruclient.konachan.KonachanClient
import kotlinx.coroutines.runBlocking
runBlocking {
val client = KonachanClient()
client.search {
tag("sousou_no_frieren")
}.forEach { post ->
println(post.previewUrl)
}
}
The search method has a lambda that builds the search query.
For the Konachan client has the following methods:
tagsizeorderrating
The other clients have only the tag method for search.
io.github.magonxesp.booruclient.danbooru.DanbooruClientThe Danbooru clientio.github.magonxesp.booruclient.konachan.KonachanClientThe Konachan sfw clientio.github.magonxesp.booruclient.konachan.KonachanNsfwClientThe Konachan nsfw clientio.github.magonxesp.booruclient.yandere.YandereClientThe Yande.re clientio.github.magonxesp.booruclient.safebooru.SafebooruClient.ktThe Safebooru client