package com.gh.gamecenter.search

import com.gh.gamecenter.home.custom.model.CustomPageData
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.retrofit.service.ApiService
import io.reactivex.Single

class SearchGameListRepository private constructor(private val newApi: ApiService) {

    fun searchGameList(
        key: String,
        page: Int
    ): Single<MutableList<CustomPageData.LinkColumnCollection.CustomSubjectEntity>> = newApi.searchGameList(key, page)

    companion object {

        fun newInstance() =
            SearchGameListRepository(RetrofitManager.getInstance().newApi)
    }
}