package com.gh.gamecenter.minigame.qq

import com.gh.gamecenter.entity.SubjectSettingEntity
import com.gh.gamecenter.feature.entity.GameEntity
import com.gh.gamecenter.retrofit.RetrofitManager
import com.gh.gamecenter.retrofit.service.ApiService
import com.gh.gamecenter.subject.ISubjectListRepository
import io.reactivex.Observable
import io.reactivex.Single

class QGameSubjectListRepository(
    private val api: ApiService = RetrofitManager.getInstance().newApi,
) : ISubjectListRepository {

    override fun getColumn(
        column_id: String?,
        page: Int,
        sort: String?,
        order: String?,
        ad: String?,
        columnCollectionId: String?,
        minimumSize: Int,
        onlyFee: Boolean,
    ): Single<MutableList<GameEntity>> {
        return api.getQGameColumn(column_id, order, page, 20)
    }

    override fun getColumnSettings(column_id: String?): Observable<SubjectSettingEntity> {
        return api.getQGameColumnSettings(column_id)
    }

}