Skip to content

UnderMybrella/kornea-blaseball

Repository files navigation

kornea-blaseball

  • kornea-blaseball-base
  • kornea-blaseball-api

Api Wrapper for Blaseball, both via the official api and Chronicler.

Example

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}") 
    }

Releases

No releases published

Packages

No packages published

Languages