package com.bc_chat.circle.dataSource

import com.bc_chat.bc_base.entity.contact.Fans
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 MineFansDataSource(val type: String) : RxDataSource<Fans, List<Fans>>() {

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