Class HeadRepository

  • All Implemented Interfaces:

    
    public abstract class HeadRepository
    
                        

    Module repository, it contains all the methods required for the Main app to get data from the Module, abstract functions infoPage and sourceData are required, all other functions are optional.

    <b>Sample usage</b>

    class Repository : HeadRepository(){
    
       override fun infoPage(link: String, bypassModel: BypassModel): Flow<InfoModel?> {
           return flow {
               emit(null)
           }
       }
    
       override fun sourceData(link: String, bypassModel: BypassModel): Flow<SourceData?> {
           return flow { emit(null) }
       }
    
       override suspend fun recentsPager(bypassModel: BypassModel): Flow<PagingData<RecentModel>> {
           return Pager(
               config = PagingConfig(
                   pageSize = 20,
                   enablePlaceholders = false
               ),
               pagingSourceFactory = { RecentsSource() }
           ).flow
       }
    }