Api Wrapper for Blaseball, both via the official api and Chronicler.
val client = HttpClient(OkHttp) {
install(ContentEncoding) {
gzip()
deflate()
identity()
}
install(JsonFeature) {
serializer = KotlinxSerializer()
}
defaultRequest {
userAgent("Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0")
}
}
val blaseballApi = BlaseballApi(client)
blaseballApi.getSimulationData()
.doOnSuccess { simData ->
println("Season ${simData.season + 1}, Day ${simData.day + 1}")
}