package cn.pluss.platform.ipLocation;

import com.aliyuncs.geoip.model.v20200101.DescribeIpv4LocationResponse;

public interface IpLocationService {
    /**
     * 根据ip获取位置信息
     * @param ip    ip
     * @return example:
     * {
     * 	"ProvinceEn": "Hubei",
     * 	"RequestId": "DFEE8016-852E-4877-B67C-05C3766CAD8B",
     * 	"CityEn": "Wuhan",
     * 	"Ip": "171.113.244.142",
     * 	"Isp": "中国电信",
     * 	"Latitude": "30.504259",
     * 	"City": "武汉市",
     * 	"County": "洪山区",
     * 	"Longitude": "114.400718",
     * 	"Province": "湖北省",
     * 	"CountryEn": "China",
     * 	"Country": "中国",
     * 	"CountryCode": "CN"
     * }
     */
    DescribeIpv4LocationResponse getLocation(String ip);
}
