package com.bc_chat.circle.task

import com.bc_chat.bc_base.http.Encryption
import com.bc_chat.bc_base.http.RetrofitHelper
import com.google.gson.JsonObject
import com.zhaohaoting.framework.abs.entity.ResultEntity
import com.zhaohaoting.framework.abs.task.RxDataAsyncTask
import io.reactivex.Flowable

/**
 * author：Created by zhaohaoting on 2019/3/5
 * email：526309416@qq.com
 * desc：
 */
class ReleaseTopicTask constructor(val title: String, val content: String, val imgs: String) : RxDataAsyncTask<JsonObject, ResultEntity<JsonObject>>() {
    override fun loadDataAsyncTask(): Flowable<ResultEntity<JsonObject>>? {
        val params: MutableMap<String, Any?> = mutableMapOf("title" to title, "content" to content, "imgs" to imgs)
        return RetrofitHelper.api.releaseTopic(Encryption.encryption(params))
    }
}
