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.BrowserBean
import com.jld.vod.model.bean.GameBean
import kotlinx.coroutines.flow.Flow

class BrowserRepository {

    fun getBrowserAllList(gameApi: Apis, mid:Long,  lid:Long): Flow<PagingData<BrowserBean>> {
        return Pager(
            config = PagingConfig(pageSize = 10, initialLoadSize = 20),
            pagingSourceFactory = { BrowserPagingSource(gameApi,mid,lid) }
        ).flow
    }
}