feat: expose vehicle map data APIs
This commit is contained in:
@@ -40,10 +40,40 @@ export const products: Product[] = [
|
||||
method: "POST",
|
||||
path: "/api/v1/vehicles/total-mileage/query",
|
||||
unit: "km"
|
||||
},
|
||||
{
|
||||
code: "realtime_vehicle",
|
||||
name: "车辆实时位置与状态",
|
||||
description: "查询应用授权车辆的最新位置、在线状态、速度、总里程和采集协议。",
|
||||
version: "v1",
|
||||
status: "available",
|
||||
method: "POST",
|
||||
path: "/api/v1/vehicles/realtime/query",
|
||||
unit: ""
|
||||
},
|
||||
{
|
||||
code: "hydrogen_station",
|
||||
name: "加氢站地图点位",
|
||||
description: "只读查询资产管理库加氢站的名称、经纬度、行政区划和合作状态。",
|
||||
version: "v1",
|
||||
status: "available",
|
||||
method: "POST",
|
||||
path: "/api/v1/hydrogen-stations/query",
|
||||
unit: "座"
|
||||
}
|
||||
];
|
||||
|
||||
export const curlExample = (product: Product) => {
|
||||
if (product.code === "realtime_vehicle") return `curl --request POST \\
|
||||
--url https://open.d.lnoneos.com${product.path} \\
|
||||
--header 'Authorization: Bearer YOUR_APP_KEY' \\
|
||||
--header 'Content-Type: application/json' \\
|
||||
--data '{}'`;
|
||||
if (product.code === "hydrogen_station") return `curl --request POST \\
|
||||
--url https://open.d.lnoneos.com${product.path} \\
|
||||
--header 'Authorization: Bearer YOUR_APP_KEY' \\
|
||||
--header 'Content-Type: application/json' \\
|
||||
--data '{"province":"浙江省"}'`;
|
||||
if (product.code === "total_mileage_at_time") return `curl --request POST \\
|
||||
--url https://open.d.lnoneos.com${product.path} \\
|
||||
--header 'Authorization: Bearer YOUR_APP_KEY' \\
|
||||
|
||||
Reference in New Issue
Block a user