blob: 430f73b6721d1e92d5ef1be8f015e5370448192f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package xyz.adjutor.aniki.presentation
import com.google.gson.Gson
import com.google.gson.GsonBuilder
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import xyz.adjutor.aniki.data.manga.TopMangaApi
class Singletons {
companion object {
val gson: Gson = GsonBuilder()
.setLenient()
.create()!!
private const val BASE_URL = "https://api.jikan.moe/"
val topMangaApi: TopMangaApi = Retrofit.Builder()
.baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create(gson))
.build()
.create(TopMangaApi::class.java)
}
}
|