package com.ym.userinfo.module.net

import com.ym.library.module.*
import com.ym.library.net.NetConfig
import com.ym.library.net.Response
import com.ym.modulecommon.module.UserInfoEntity
import com.ym.userinfo.module.entity.LotteryEntity
import io.reactivex.Observable
import okhttp3.ResponseBody
import retrofit2.http.*

/**
 * Created by Antonio on 2019/5/15.
 */
interface IUserInfoApi {
    /**
     * 拉取提现配置
     *
     * @return
     */
    @POST(NetConfig.Withdraw.URL_USER_WITHDRA_LIST)
    fun getWithdrawList(): Observable<Response<List<WithdrawEntity>>>

    /**
     * 我的抽奖/提现列表
     *
     * @return
     */
    @GET(NetConfig.Withdraw.URL_USER_GUESSMUSIC_LOTTERY)
    fun getGuessMusicLottery(): Observable<Response<List<LotteryEntity>>>


    /**
     * 抽奖转盘配置
     *
     * @return
     */
    @GET(NetConfig.Withdraw.URL_USER_LOTTERY_CONFIG)
    fun getLotteryConfig(@Query("sessionId") sessionId: String):
            Observable<Response<List<WithdrawEntity>>>

    /**
     * 抽奖转盘抽奖结果
     *
     * @return
     */
    @GET(NetConfig.Withdraw.URL_USER_LOTTERY_RESULT)
    fun getLotteryResult(@Query("sessionId") sessionId: String):
            Observable<Response<WithdrawEntity>>

    /**
     * 获取用户金币
     *
     * @return
     */
    @GET(NetConfig.Withdraw.URL_USER_GS_PAGE_INFO)
    fun getUserGold(): Observable<Response<UserInfoEntity>>

    /**
     * 微信提现
     *
     * @return
     */
    @POST(NetConfig.Withdraw.URL_USER_GS_DO_WD)
    fun getUserWxWithdraw(@Query("wdId") wdId: Int): Observable<Response<WithdrawEntity>>

    /**
     * 金币兑换
     *
     * @return
     */
    @POST(NetConfig.Withdraw.URL_USER_GS_COIN2CASH)
    fun getUserCoin2cash(@Query("sid") sId: String): Observable<Response<WithdrawEntity>>

    /**
     * 微信是否绑定
     *
     * @return
     */
    @GET(NetConfig.User.URL_USER_ISBINDWITHDRAWWX)
    fun getIsBindWithdrawWx(@Query("token") token: String):
            Observable<Response<UserInfoEntity>>

    /**
     * 提现记录
     *
     * @return
     */
    @GET(NetConfig.Withdraw.URL_USER_WD_HISTORY)
    fun getUserhiWithdrawHistory(): Observable<Response<List<WithdrawEntity>>>

    /**
     * 注意事项
     *
     * @return
     */
    @GET(NetConfig.User.URL_USER_MIND)
    fun getUserMind(): Observable<Response<UserInfoEntity>>

    /**
     * 注意事项
     *
     * @return
     */
    @GET(NetConfig.User.URL_USER_COIN2CASH_CHECK)
    fun getUserCoin2cash_check(): Observable<Response<WithdrawEntity>>

    /**
     * 我的抽奖提现
     *
     * @return
     */
    @POST(NetConfig.Withdraw.URL_USER_GS_DO_LOTTERY_WD)
    fun getUserWxWithdrawLottery(@Query("sessionId") sessionId: String): Observable<Response<WithdrawEntity>>

    /**
     * h5-post接口
     *
     * @param
     * @param
     * @return
     */
    @POST
    fun webApiPost(@Url url: String): Observable<retrofit2.Response<ResponseBody>>


    /**
     * h5-get接口
     *
     * @param
     * @param
     * @return
     */
    @GET
    fun webApiGet(@Url url: String): Observable<retrofit2.Response<ResponseBody>>


}