package com.yidianling.consultant.model

import com.ydl.ydlcommon.data.http.RxUtils
import com.yidianling.consultant.bean.HotSearchBean
import com.yidianling.consultant.bean.SearchWordsBean
import com.yidianling.consultant.contract.IHotSearchContract
import com.yidianling.consultant.http.hotsearch.HotSearchDataManager
import io.reactivex.Observable

/**
 * @author yuanwai
 * @描述:测评首页数据模型实现类
 * @Copyright Copyright (c) 2018
 * @Company 壹点灵
 * @date 2018/7/26
 */
class HotSearchModelImpl : IHotSearchContract.Model{
    override fun searchData(): Observable<HotSearchBean> {
        return HotSearchDataManager.getHttp().searchData().compose(RxUtils.resultJavaData())
    }

    override fun getSearchWords(map:HashMap<String,Any>): Observable<SearchWordsBean> {
        return HotSearchDataManager.getHttp().getSearchWords(map).compose(RxUtils.resultJavaData())
    }
}