package com.ym.library.net

import com.ym.library.module.*
import io.reactivex.Observable
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 * @author (wangXuewei)
 * @datetime 2020-10-09 22:21 GMT+8
 * @detail :
 */
interface IGameApi {

    /**
     * 获取农场首页数据
     * @param
     * @param
     * @return
     */
    @GET(NetConfig.Game.URL_GAME_HOME_INFO)
    fun getGameHomeInfo(): Observable<Response<HomeInfoEntity>>

    /**
     * 云朵加速判断
     * @param
     * @param
     * @return
     */
    @GET(NetConfig.Game.URL_GAME_CLOUD_CHECK)
    fun getGameCloudCheck(): Observable<Response<GuideEntity>>

    /**
     * 地块列表
     * @param
     * @param
     * @return
     */
    @GET(NetConfig.Game.URL_GAME_LIST_LAND)
    fun getListLand(): Observable<Response<NewLandListEntity>>

    /**
     * 云朵加速
     * @param
     * @param
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_CLOUD_SPEED)
    fun getCloudSpeed(): Observable<Response<StatusEntity>>

    /**
     * 解锁地块/种植种子/收获果实
     * @param id 地块列表id
     * @param type 解锁地块传1 种植种子传2 收获果实传3
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_UNLOCK_LAND)
    fun getUnlockLand(
        @Query("id") id: Int,
        @Query("type") type: Int,
        @Query("second") second: Int
    ): Observable<Response<StatusEntity>>

    /**
     * 加速剂
     * @param id 地块列表id
     * @param
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_USE_ACCELERATORS)
    fun getUseAccelerators(@Query("id") id: Int): Observable<Response<StatusEntity>>

    /**
     * 金币购买种子
     * @param
     * @param
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_BUY_SEED)
    fun getBuySeed(@Query("id") id: Int,@Query("second") second: Int): Observable<Response<StatusEntity>>

    /**
     * 仓库
     * @param id 仓库列表id
     * @param
     * @return
     */
    @GET(NetConfig.Game.URL_GAME_WAREHOUSE_DATA)
    fun getWareHouseData(@Query("type") id: Int): Observable<Response<List<LandListEntity>>>

    /**
     * 订单数据
     * @param
     * @paramq
     * @return
     */
    @GET(NetConfig.Game.URL_GAME_ORDER_DATA)
    fun getOrderData(): Observable<Response<OrderListEntity>>

    /*
    转盘列表
     */
    @GET(NetConfig.Game.URL_GAME_TURNTABLE_LIST)
    fun getTurntableList(): Observable<Response<TurntableEntity>>

    /**
     * 订单领取
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_ORDER_RECEIVE)
    fun getOrderReceive(): Observable<Response<StatusEntity>>

    //抽奖结果
    @POST(NetConfig.Game.URL_GAME_FARM_LOTTERY)
    fun getLotteryResult(): Observable<Response<TurntableEntity.Turntable>>

    //签到列表
    @GET(NetConfig.Game.URL_GAME_FARM_LIST)
    fun getOrchardSignTask(): Observable<Response<SinginEntity>>

    //每日任务
    @GET(NetConfig.Game.URL_GAME_FARM_DAILY_TASK)
    fun getOrchardDailyTask(): Observable<Response<List<WateringTaskEntity>>>

    /**
     * 看视频获得种子
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_INCR_SEED)
    fun getVideoSeedReceive(@Query("id") id: Int,@Query("second") second: Int): Observable<Response<StatusEntity>>

    /**
     * 看视频获得加速剂
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_INCR_ACCELERATORS)
    fun getVideoAcceleratorsReceive(@Query("id") id: Int): Observable<Response<StatusEntity>>

    /**
     * 看视频获得宝箱奖励
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_OPEN_BOX)
    fun getopenBox(): Observable<Response<FlyBoxEntity>>

    /**
     * 打卡普通打卡任务领取
     */
    @POST(NetConfig.Game.URL_CLOCK_BOX_RECEIVE)
    fun geClockBoxReceive(): Observable<Response<FlyBoxEntity>>

    /**
     * 底部拆红包奖励
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_OPEN_PLANT_BOX)
    fun getOpenPlantBox(): Observable<Response<FlyBoxEntity>>

    /**
     * 看视频上报
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_AD_VIDEO_REPORT)
    fun adVideoReport(): Observable<Response<StatusEntity>>

    /**
     * 任务领取奖励
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_DAILY_TASK_RECEIVE)
    fun getTaskReceive(@Query("id") id: Int, @Query("type") type: Int): Observable<Response<Any>>

    /**
     * 加速剂领取奖励
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_ACCELERATORS_TASK_RECEIVE)
    fun getAcceleTask(@Query("sid") id: Int): Observable<Response<TaskCompleteEntity>>

    /**
     * 排行榜领取
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_FARM_RANK_RECEIVE)
    fun getRankReceive(): Observable<Response<RankReceiveEntity>>


    /**
     * 红包列表
     * @param
     * @paramq
     * @return
     */
    @GET(NetConfig.Game.URL_GAME_RED_PACK_LIST)
    fun getRedPackList(): Observable<Response<List<RedPackListEntity>>>

    /**
     * 红包领取
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_RED_PACK_RECEIVE)
    fun getRedPackReceive(@Query("id") id: Int): Observable<Response<RedPackReceiveEntity>>

    /**
     * 红包倍数领取
     * @param
     * @paramq
     * @return
     */
    @POST(NetConfig.Game.URL_GAME_RED_PACK_AWARD_RECEIVE)
    fun getRedPackAwardReceive(@Query("sid") id: String): Observable<Response<RedPackDoubleReceiveEntity>>


    /*
     兑换列表
    */
    @GET(NetConfig.Game.URL_GAME_WITHDRAW_LIST)
    fun getWithDrawList(): Observable<Response<WithDrawEntity2>>

    /*
    兑换
     */
    @POST(NetConfig.Game.URL_GAME_DOWD)
    fun dowd(@Query("wdId") id: Int): Observable<Response<ExchangeEntity>>

    /*
   兑换记录
    */
    @GET(NetConfig.Game.URL_GAME_WD_HISTORY)
    fun getWdHistory(): Observable<Response<List<WdHistoryEntity>>>

    //加速剂任务
    @GET(NetConfig.Game.URL_GAME_ACCELERATORS_TASK)
    fun getAcceleratorsTask(): Observable<Response<List<WateringTaskEntity>>>

    /*
 加速剂任务视频
  */
    @POST(NetConfig.Game.URL_GAME_THIRD_PARTY)
    fun thirdParty(@Query("id") id: Int): Observable<Response<Any>>

    //新手判断
    @GET(NetConfig.Game.URL_GAME_USER_GUIDE)
    fun getGuide(): Observable<Response<GuideEntity>>

    //打卡提现列表
    @GET(NetConfig.Game.URL_GAME_CLOCK_LIST)
    fun getClockList(): Observable<Response<ClockInWithdrawEntity>>

    //打卡提现
    @POST(NetConfig.Game.URL_GAME_DO_WD)
    fun getDoWd(@Query("clockId") clockId:Int): Observable<Response<ExchangeEntity>>

    /**
     * 任务页列表
     */
    @GET(NetConfig.Task.TASK_URL)
    fun getTaskListInfo(@Query("slotName") slotName: String): Observable<Response<TaskListEntity>>

    /**
     * 任务页列表
     */
    @POST(NetConfig.Task.TASK_COMPLETE_TASK)
    fun getTaskComplete(@Query("id") sid: Int): Observable<Response<TaskCompleteEntity>>

    /**
     * 任务页列表
     */
    @GET(NetConfig.Game.URL_GAME_TASK_PROCESS)
    fun getTaskProcess(): Observable<Response<DiamondEntity>>

    /**
     * 看视频任务
     */
    @POST(NetConfig.Game.URL_GAME_WELFARE_VIDEO_REPORT)
    fun getWelfareVideoReport(@Query("sid") sid: Int): Observable<Response<NewsEntity>>

    /**
     * 福利开宝箱
     */
    @POST(NetConfig.Game.URL_GAME_WELFARE_TASK_BOX)
    fun getWelfareTaskBox(): Observable<Response<List<FlyBoxEntity>>>

    /**
     * 福利提现
     */
    @POST(NetConfig.Game.URL_GAME_WELFARE_TASK_CASH)
    fun getWelfareTaskCash(): Observable<Response<ExchangeEntity>>

    @GET(NetConfig.Game.URL_COLLECT_CARD)
    fun getCollectCard(): Observable<Response<PuzzleEntity?>>

    @GET(NetConfig.Game.URL_COLLECT_CARD_PUT)
    fun getCollectCardPut(@Query("index") index: Int): Observable<Response<PuzzleEntity?>>

    @GET(NetConfig.Game.URL_COLLECT_CARD_ADV_PUT_OR_ADD)
    fun getCollectCardPutorAdd(@Query("index") index: Int): Observable<Response<PuzzleEntity?>>

    // 看广告一键拼图
    @GET(NetConfig.Game.URL_COLLECT_CARD_ADV)
    fun getCollectCardAdv(): Observable<Response<PuzzleEntity?>>

    // 一键拼图
    @GET(NetConfig.Game.URL_COLLECT_CARD_AUTOMATIC)
    fun getCollectCardAutoMatic(): Observable<Response<PuzzleEntity?>>

    // 开宝箱
    @GET(NetConfig.Game.URL_COLLECT_CARD_OPEN)
    fun openCard(): Observable<Response<PuzzleEntity?>>

    // 收金币获得卡片
    @GET(NetConfig.Game.URL_COLLECT_CARD_ADD_CARD)
    fun addCard(): Observable<Response<AddCardEntity?>>
    /**
     * 首页列表数据
     * @param
     * @paramq
     * @return
     */
    @GET(NetConfig.Game.URL_GAME_ORDER_LIST)
    fun getHomeWList(): Observable<Response<List<HomeListEntity>>>

    /**
     * 看领金币视频任务
     */
    @POST(NetConfig.Game.URL_GAME_VIDEO_TASK_COMPLETE)
    fun getTaskCompleteReport(@Query("sid") sid: Int): Observable<Response<NewsEntity>>
    /**
     * 仓库列表
     */
    @GET(NetConfig.Game.URL_GAME_WAREHOUSEDATA)
    fun getWarehouseData(): Observable<Response<List<FlyBoxEntity>>>
}