package com.gh.gamecenter.setting.retrofit

import com.gh.gamecenter.common.retrofit.BaseRetrofitManager
import com.gh.gamecenter.common.utils.EnvHelper.getHost
import com.gh.gamecenter.core.utils.SingletonHolder
import com.gh.gamecenter.setting.HaloApp

class RetrofitManager private constructor(): BaseRetrofitManager() {

    val api: ApiService

    init {
        val context = HaloApp.getInstance().applicationContext
        val okHttpNormalConfig = getOkHttpConfig(context, 0, 2)
        api = provideService(okHttpNormalConfig, getHost(), ApiService::class.java)
    }

    companion object: SingletonHolder<RetrofitManager>(::RetrofitManager)
}