Created
September 10, 2020 01:49
-
-
Save carolinemusyoka/9f088a11a6667e255ef6054b0a5ac441 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object RetrofitBuilder { | |
private const val BASE_URL = "https://akabab.github.io/superhero-api/api/" | |
private fun getRetrofit(): Retrofit{ | |
return Retrofit.Builder() | |
.baseUrl(BASE_URL) | |
.addConverterFactory(GsonConverterFactory.create()) | |
.build() | |
} | |
val apiService = getRetrofit().create(ApiService::class.java) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment