Scala 3 client implementation for the Random User Generator API, built using ZIO and Sttp.
Add the following to your build.sbt:
libraryDependencies += "io.github.juliano" % "random-user_3" % "0.1.1"
Here's a basic example of how to use the client:
import io.github.juliano.randomuser.*
import zio.*
object Example extends ZIOAppDefault:
def run =
val program = for
content <- Client.fetch()
_ <- Console.printLine(s"Random user: ${content.results.head}")
_ <- Console.printLine(s"API info: ${content.info}")
yield ()
program.provide(Client.default)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Random User Generator for providing the API!