package com.jld.vod.utils.http

import com.google.gson.GsonBuilder
import com.jld.vod.config.Config
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

object PagingRetrofitUtils {
    private val retrofit: Retrofit by lazy {
        Retrofit.Builder()
            .baseUrl(Config.ApiBaseUrl)
            .addConverterFactory(GsonConverterFactory.create(GsonBuilder().create())).build()
    }

    fun <T> create(mClass: Class<T>) : T {
        return retrofit.create(mClass)
    }
}