YHGW/localapi.txt/localapi.txt

256 lines
4.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

##
##
## 本地api只供本地二层访问及转发
##
##
##########################################
## http://192.168.3.188:10086/api/v1/ ##
##########################################
1 获取用水量
GET http://192.168.3.188:10086/api/v1/totalWater
RESULT:
{
"data": {
"totalWater": 1
},
"status": 200
}
2 获取用电量
GET http://192.168.3.188:10086/api/v1/totalElectricity
RESULT:
{
"data": {
"totalElectric": 99.9
},
"status": 200
}
3 获取臭味级别
GET http://192.168.3.188:10086/api/v1/stink
RESULT:
{
"data": {
"stink": "无味"
},
"status": 200
}
4 获取环境信息
GET http://192.168.3.188:10086/api/v1/environmentDate
RESULT:
{
"data": {
"PM10": 14,
"pm2.5": 11,
"TVOC": 9.8,
"二氧化碳": 457,
"温度": 26.6,
"湿度": 45.2,
"甲醛": 4
},
"status": 200
}
5 获取满意度
GET http://192.168.3.188:10086/api/v1/satisfaction
RESULT:
{
"data": {
"satisfaction": 1 // 浮点型1为100%
},
"status": 200
}
6 获取当日人流量
GET http://192.168.3.188:10086/api/v1/traffic
RESULT:
{
"data": {
"traffic": 100
},
"status": 200
}
7 获取厕位状况
##################################################
## http://192.168.3.188:10086/api/v1/seat/:id ##
## id 取值在[1, 2, 3, 4, 5] ##
## 1 : 获取男厕位 ##
## 2 : 获取男便池 ##
## 3 : 获取女厕位 ##
## 4 : 获取母婴 ##
## 5 : 获取残卫 ##
##################################################
7.1 获取男厕位
GET http://192.168.3.188:10086/api/v1/seat/1
RESULT:
{
"data": {
"positionList": [
1,
2,
3,
4,
5,
6,
7,
8
],
"hasPersonList": [
0,
1,
0,
0,
0,
0,
0,
0
],
"emptyPosition": 7,
"occupyPosition": 1
},
"status": 200
}
7.2 获取男便池
GET http://192.168.3.188:10086/api/v1/seat/2
RESULT:
{
"data": {
"positionList": [
4,
5,
6,
7,
8,
1,
2,
3
],
"hasPersonList": [
0,
0,
0,
0,
0,
0,
0,
0
],
"emptyPosition": 8,
"occupyPosition": 0
},
"status": 200
}
7.3 获取女厕位
GET http://192.168.3.188:10086/api/v1/seat/3
RESULT:
{
"data": {
"positionList": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
],
"hasPersonList": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"emptyPosition": 13,
"occupyPosition": 0
},
"status": 200
}
7.4 获取母婴
GET http://192.168.3.188:10086/api/v1/seat/4
RESULT:
{
"data": {
"positionList": [
1
],
"hasPersonList": [
0
],
"emptyPosition": 1,
"occupyPosition": 0
},
"status": 200
}
7.5 获取残卫
GET http://192.168.3.188:10086/api/v1/seat/5
RESULT:
{
"data": [
[
1,
0
],
[
2,
0
]
],
"status": 200
}
8 获取天气情况
GET http://192.168.3.188:10086/api/v1/weather
RESULT:
{
"data": {
"skycon": "CLOUDY",
"icon_url": "http://192.168.3.188:10080/icon/CLOUDY.png",
"o3": 26,
"co": 0.5,
"so2": 7,
"no2": 30,
"temperature": 21.21,
"humidity": 0.74,
"pm25": 21,
"pm10": 32,
"cloudrate": 0.9,
"aqi": 32,
"dswrf": 31.2,
"visibility": 28.7,
"ultraviolet_desc": "很弱",
"pres": 101158.33,
"comfort_desc": "舒适",
"wind_direction": 30.18,
"wind_speed": 19.56,
"temperature_indoor": 26.6,
"humidity_indoor": 44.9
},
"status": 200
}