You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -21,7 +21,7 @@ This client is written using [sttp](https://sttp.softwaremill.com/en/latest/inde
21
21
22
22
## Usage
23
23
24
-
Instantiate a backend implicitly, create a `PokeApiClient()` and start consuming the api, calling `client.send(PokeRequest(id | name))`. Most requests accept an `id: Long` or `name: String` (have a look at [Scala 3 Union Types](https://docs.scala-lang.org/scala3/book/types-union.html)).
24
+
Instantiate a backend, use it create a `PokeApiClient(backend)` and start consuming the api, calling `client.send(PokeRequest(id | name))`. Most requests accept an `id: Long` or `name: String` (have a look at [Scala 3 Union Types](https://docs.scala-lang.org/scala3/book/types-union.html)).
25
25
26
26
It's possible to [list / paginate resources](https://pokeapi.co/docs/v2#resource-listspagination-section) as well, calling `client.send(PokeRequest.resourceList(offset: Int, limit: Int))`
27
27
@@ -35,43 +35,23 @@ Every response is automatically cached in memory, making all subsequent requests
You can find more examples using Fs2, Armaria and okhttp [in the tests](https://github.com/juliano/pokeapi-scala/tree/main/src/test/scala/io/github/juliano/pokeapi)
0 commit comments