package com.jld.vod.repository

import androidx.paging.Pager
import androidx.paging.PagingConfig
import androidx.paging.PagingData
import com.jld.vod.interfaces.remote.Apis
import com.jld.vod.model.bean.GameBean
import kotlinx.coroutines.flow.Flow

class GameRepository {

    fun getGameAllList(gameApi: Apis, mid:Long,  lid:Long, terminal :String): Flow<PagingData<GameBean>> {
        return Pager(
            config = PagingConfig(pageSize = 10, initialLoadSize = 20),
            pagingSourceFactory = { GamePagingSource(gameApi,mid,lid,terminal) }
        ).flow
    }
}