LibreTube/app/src/main/java/com/github/libretube/RetrofitInstance.kt
2022-02-08 18:27:13 +04:00

20 lines
573 B
Kotlin

package com.github.libretube
import android.content.Context
import android.util.Log
import androidx.preference.PreferenceManager
import kotlinx.coroutines.withContext
import retrofit2.Retrofit
import retrofit2.converter.jackson.JacksonConverterFactory
import kotlin.coroutines.coroutineContext
object RetrofitInstance {
lateinit var url: String
val api: PipedApi by lazy {
Retrofit.Builder()
.baseUrl(url)
.addConverterFactory(JacksonConverterFactory.create())
.build()
.create(PipedApi::class.java)
}
}