Skip to content

Instantly share code, notes, and snippets.

@marcelpinto
Created April 30, 2018 09:18
Show Gist options
  • Save marcelpinto/3ebfc68e669e7dd627b98ab4c218fa7f to your computer and use it in GitHub Desktop.
Save marcelpinto/3ebfc68e669e7dd627b98ab4c218fa7f to your computer and use it in GitHub Desktop.
WeatherExample on how to create the retrofit instance
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