package com.bc_chat.circle.dataSource

import com.bc_chat.bc_base.http.Encryption
import com.bc_chat.bc_base.http.RetrofitHelper
import com.bc_chat.bc_base.entity.contact.Dynamic
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 DynamicDataSource(val type: String? = "1") : RxDataSource<Dynamic, List<Dynamic>>() {

    override fun loadListFromNetWork(params: HashMap<String, Any?>): Flowable<ResultEntity<List<Dynamic>>>? {
        params["type"] = type
        return RetrofitHelper.api.getDynamicList(Encryption.encryption(params))
    }
}
