Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[JVM - API V1] HTTP API client for Java/Kotlin - JVM based (Arthur)
#1
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())
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)