TSDB - The Sports Database Fan Club for the TheSportsDB API

Full Version: HTTP API client for Java/Kotlin - JVM based (Arthur)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
JVM based TheSportsDB HTTP API client to connect to the api of https://thesportsdb.com/ 


Download: Github: https://github.com/Biacode/jsportsdb
Developer: Arthur
Github Profile: https://github.com/Biacode

Java Example:

Code:
public class JavaDemoApp {
    public static void main(String[] args) {
        final SearchTeamClient searchTeamClient = new SearchTeamClientImpl();
        final ResultResponse searchTeamResult = searchTeamClient.byShortCode("Ars");
        System.out.println(searchTeamResult.asMap());
        System.out.println(searchTeamResult.asString());

        final ListSportsClient listSportsClient = new ListSportsClientImpl();
        final ResultResponse listSportsResult = listSportsClient.all();
        System.out.println(listSportsResult.asMap());
        System.out.println(listSportsResult.asString());
    }
}

Kotlin Example:

Code:
object KotlinDemoApp {
    @JvmStatic
    fun main(args: Array<String>) {
        val searchTeamResult = SearchTeamClientImpl().byShortCode("Arsenal")
        println(searchTeamResult.asString())
        println(searchTeamResult.asMap())

        val listSportsResult = ListSportsClientImpl().all()
        println(listSportsResult.asString())
        println(listSportsResult.asMap())
    }
}