package shop.alien.api.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 调用腾讯地图
 *
 * @author ssk
 * @version 1.0
 * @date 2024/10/25 13:49
 */
@FeignClient(url = "https://apis.map.qq.com", name = "tencentMap")
public interface TencentMapFeign {

    /**
     * 腾讯
     * 逆地理编码获取详细地址
     * 每日配额10000,并发每秒5
     * https://apis.map.qq.com/ws/geocoder/v1/
     *
     * @param location 经纬度
     * @param key      key
     * @return JSONObject
     */
    @GetMapping("/ws/geocoder/v1")
    JSONObject getLocationInfo(@RequestParam(value = "location") String location,
                               @RequestParam(value = "key") String key);

}
