package com.yidianling.uikit.custom.http

import com.ydl.ydlcommon.base.config.YDL_DOMAIN
import com.ydl.ydlcommon.base.config.YDL_DOMAIN_JAVA
import com.ydl.ydlcommon.data.http.BaseAPIResponse
import com.yidianling.uikit.custom.http.response.ChatStatusBean
import com.yidianling.uikit.custom.http.response.CommonQuestionBean
import com.yidianling.uikit.custom.http.response.RecommendExpertBean
import com.yidianling.uikit.custom.http.response.UserQuestInfoBean
import io.reactivex.Observable
import okhttp3.RequestBody
import retrofit2.http.*

/**
 * Created by xj on 2019/6/26.
 */
interface ServiceApi{
    //获取专家状态信息
    @GET("chat/status")
    @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
    fun getDoctorChatStatus(@Query("doctorUid") doctorUid: Long): Observable<BaseAPIResponse<ChatStatusBean>>

    //获取专家状态信息
    @GET("chat/assistant-online-status")
    @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
    fun getAssistantChatStatus(@Query("assistantUid") assistantUid: Long): Observable<BaseAPIResponse<Int>>


    //获取推荐专家列表信息
    @GET("doctor/recommendSimilarListeners")
    @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
    fun getRecommendExpertList(@Query("doctorUid") doctorUid: Long, @Query("catName") catName: String, @Query("limit") limit: Int): Observable<BaseAPIResponse<ArrayList<RecommendExpertBean>>>

    //获取常用语
    @POST("phrase/list")
    @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
    fun getCommonQuestionList(): Observable<BaseAPIResponse<List<CommonQuestionBean>>>

    //常用语的点击
    @GET("phrase/count")
    @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
    fun sendCommonQuestionCount(@Query("id") id: String): Observable<BaseAPIResponse<Any>>


    //信息采集的问题
    @GET("user/collect/list")
    @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
    fun userCollectList(): Observable<BaseAPIResponse<List<UserQuestInfoBean>>>

    //信息采集的问题
    @POST("user/collect/submit")
    @Headers(YDL_DOMAIN + YDL_DOMAIN_JAVA)
    fun submitUserCollect(@Body body: RequestBody): Observable<BaseAPIResponse<Any>>
}