https://kotlinlang.org logo
z

ZariApps

08/25/2020, 7:45 PM
is there any good documention or videos on how to include APIs calls into your code?
c

Casey Brooks

08/25/2020, 8:03 PM
Ktor client is what you’re looking for in a multiplatform scenario https://ktor.io/clients/index.html. Otherwise, Retrofit/OkHttp should be your go-to for an Android-only project.
z

ZariApps

08/25/2020, 8:24 PM
will that work with json files?
c

Casey Brooks

08/25/2020, 8:28 PM
Yes, they both do. Here’s the docs for Ktor https://ktor.io/clients/http-client/features/json-feature.html. For retrofit, you can pick your preferred JSON library to handle parsing JSON from an API https://square.github.io/retrofit#restadapter-configuration