Created
April 30, 2018 09:18
-
-
Save marcelpinto/3ebfc68e669e7dd627b98ab4c218fa7f to your computer and use it in GitHub Desktop.
WeatherExample on how to create the retrofit instance
This file contains 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
val moshi = Moshi.Builder().add(KotlinJsonAdapterFactory()).build() | |
val retrofit = Retrofit.Builder() | |
.baseUrl("https://weather.api.here.com") | |
.addConverterFactory(MoshiConverterFactory.create(moshi)) | |
.build() | |
weatherApi = retrofit.create(WeatherApi::class.java) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment