package com.mogo.cloud.tanlu.net;

import com.mogo.cloud.network.BaseData;
import com.mogo.cloud.tanlu.bean.RoadInfos;
import com.mogo.cloud.tanlu.bean.UploadResult;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @author lixiaopeng
 * @description
 * @since 2021/1/20
 */
public interface TanluApiService {
    /**
     * 查询（搜索）道路事件信息
     * 接口文档：http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42305842
     * 文档中有些参数暂时没有用到，包括radius,limit
     * @return dzt-launcherSnapshot.zhidaozhixing.com
     */
    @FormUrlEncoded
    @POST("/yycp-launcherSnapshot/launcherSnapshot/searchRoadEventsSync")
//    Observable<BaseDataCompat<RoadInfos>> queryRoadInfos(@FieldMap Map<String, Object> params);
    Observable<BaseData<RoadInfos>> queryRoadInfos(@FieldMap Map<String, Object> params);

    //上报情报数据 dzt-deva.zhidaozhixing.com
    @FormUrlEncoded
    @POST("/deva/car/path/no/addInfomation/v2")
    Observable<BaseData<UploadResult>> uploadInformation(@FieldMap Map<String, String> information);

}
