Skip to content

Commit

Permalink
feat: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmaalvarezbasetis committed Feb 8, 2024
1 parent 98bc423 commit 87b80b3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Booru client
[![](https://jitpack.io/v/MagonxESP/booru-client.svg)](https://jitpack.io/#MagonxESP/booru-client)
[![](https://jitpack.io/v/magonxesp/booru-client.svg)](https://jitpack.io/#magonxesp/booru-client)

Danbooru, yande.re and konachan client for kotlin

Expand All @@ -9,33 +9,33 @@ Add the jitpack repository

```kotlin
repositories {
mavenCentral()
maven { setUrl("https://jitpack.io") }
mavenCentral()
maven { setUrl("https://jitpack.io") }
}
```

And the dependency and the required dependencies

```kotlin
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_corroutines_version") // required
implementation("io.arrow-kt:arrow-core:$arrowkt_version") // required
implementation("com.github.MagonxESP:booru-client:0.0.2")
implementation("com.github.magonxesp:booru-client:0.0.6")
```

## Usage

Search by tag on Konachan for example.

```kotlin
import com.magonxesp.booruclient.konachan.KonachanClient
import kotlinx.coroutines.runBlocking

runBlocking {
val client = KonachanClient()

client.search {
tag("sousou_no_frieren")
}.onRight { posts ->
posts.forEach { post ->
println(post.previewUrl)
}
}.forEach { post ->
println(post.previewUrl)
}
}

Expand Down

0 comments on commit 87b80b3

Please sign in to comment.