current
实时气象。
调用方式:
typescript
const data = await client.weather.current(params);typescript
import { Weather } from 'loongship-data';
const data = await Weather.current({ key: 'YOUR_KEY', ...params });请求参数 (WeatherCurrentParams)
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| lon | number | 是 | 经度,SDK 不做单位转换。 |
| lat | number | 是 | 纬度,SDK 不做单位转换。 |
| key | string | 否 | User authorization key. Optional when an instance key or global key is registered. |
返回类型: WeatherCurrentData
查看类型定义
typescript
export type LoongshipRecord = Record<string, unknown>;