mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-16 07:10:29 +05:30
20 lines
573 B
Kotlin
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)
|
|
}
|
|
} |