package com.bc_chat.circle.dataSource

import com.bc_chat.bc_base.entity.contact.CommentMine
import com.bc_chat.bc_base.http.Encryption
import com.bc_chat.bc_base.http.RetrofitHelper
import com.zhaohaoting.framework.abs.datasource.RxDataSource
import com.zhaohaoting.framework.abs.entity.ResultEntity
import io.reactivex.Flowable
import java.util.*

/**
 * author：Created by zhaohaoting on 2019/2/27
 * email：526309416@qq.com
 * desc：
 */
class CommentMineDataSource(val type: String) : RxDataSource<CommentMine, List<CommentMine>>() {

    override fun loadListFromNetWork(params: HashMap<String, Any?>): Flowable<ResultEntity<List<CommentMine>>> {
        params.put("type", type)
        return RetrofitHelper.api.getCommentMineList(Encryption.encryption(params))
    }
}
