thesportsdb-client
A Kotlin/JVM client for the TheSportsDB API, v1 and v2.
Start with io.github.rohang27.thesportsdb.SportsDbClient (Kotlin, suspend) or io.github.rohang27.thesportsdb.SportsDbFutures (Java, CompletableFuture). Every method's documentation names the endpoint it calls, and every model property names the API field it comes from.
val client = SportsDbClient { apiKey = System.getenv("THESPORTSDB_API_KEY") ?: "123" }
val team = client.v1.lookup.team(133604)Packages
The clients (SportsDbClient, SportsDbFutures), their configuration, the v1 and v2 endpoint groups, Helpers for common tasks (v2 or v1 depending on the key), and the exceptions.
Optional response caching: io.github.rohang27.thesportsdb.cache.ResponseCache, the in-memory implementation, and the io.github.rohang27.thesportsdb.cache.CachePolicy that sets a time-to-live per kind of data.
The HTTP layer. Implement io.github.rohang27.thesportsdb.http.HttpTransport to use another HTTP stack.