mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-15 23:00:31 +05:30
17 lines
451 B
Kotlin
17 lines
451 B
Kotlin
package com.github.libretube
|
|
|
|
import retrofit2.Retrofit
|
|
import retrofit2.converter.jackson.JacksonConverterFactory
|
|
|
|
object RetrofitInstance {
|
|
lateinit var url: String
|
|
val lazyMgr = resettableManager()
|
|
val api: PipedApi by resettableLazy(lazyMgr) {
|
|
Retrofit.Builder()
|
|
.baseUrl(url)
|
|
.addConverterFactory(JacksonConverterFactory.create())
|
|
.build()
|
|
.create(PipedApi::class.java)
|
|
}
|
|
|
|
} |