- system
- access
- app
- common
- data
- dict
- log
- module
- ops
- role
- tenant
- user
- notify
- area
- project
- slot
- dept
- job
- open
- data
获取天气情况
POST
/api/v1/system/common/weather/read
system/commonsystemCommon
请求参数
Header 参数
Ithings-Project-Id
string
可选
默认值:
{{Ithings-Project-Id}}
Ithings-Token
string
可选
默认值:
{{iThings-token}}
app-code
string
可选
默认值:
{{appCode}}
device-id
string
可选
Body 参数application/json
position
object (Point)
可选
longitude
number <double>
经度
<= 180
latitude
number <double>
纬度
<= 90
projectID
string
可选
示例
{
"position": {
"longitude": 180,
"latitude": 90
},
"projectID": "string"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/system/common/weather/read' \
--header 'Ithings-Project-Id: {{Ithings-Project-Id}}' \
--header 'Ithings-Token: {{iThings-token}}' \
--header 'app-code: {{appCode}}' \
--header 'device-id;' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
code
integer
返回code
默认值:
200
msg
string
返回的消息
data
object (WeatherReadResp)
可选
obsTime
string
必需
temp
string
必需
feelsLike
string
必需
icon
string
必需
text
string
必需
wind360
string
必需
windDir
string
必需
windScale
string
必需
windSpeed
string
必需
humidity
string
必需
precip
string
必需
pressure
string
必需
vis
string
必需
cloud
string
必需
dew
string
必需
air
object (WeatherAir)
必需
示例
{
"code": "200",
"msg": "string",
"data": {
"obsTime": "string",
"temp": "string",
"feelsLike": "string",
"icon": "string",
"text": "string",
"wind360": "string",
"windDir": "string",
"windScale": "string",
"windSpeed": "string",
"humidity": "string",
"precip": "string",
"pressure": "string",
"vis": "string",
"cloud": "string",
"dew": "string",
"air": {
"aqi": "string",
"level": "string",
"category": "string",
"primary": "string",
"pm10": "string",
"pm2p5": "string",
"no2": "string",
"so2": "string",
"co": "string",
"o3": "string"
}
}
}
修改于 2025-03-25 09:32:22