update
This commit is contained in:
parent
bbc63afc29
commit
e5a0a6b18b
|
@ -26,6 +26,8 @@ headers = {
|
||||||
'ContentType': 'application/json',
|
'ContentType': 'application/json',
|
||||||
'Authorization': "Basic " + token
|
'Authorization': "Basic " + token
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# example
|
||||||
# RFID
|
# RFID
|
||||||
send1 = {
|
send1 = {
|
||||||
"m": ["cid", "r", "v"],
|
"m": ["cid", "r", "v"],
|
||||||
|
@ -90,3 +92,8 @@ def get_sql(deviceId, type):
|
||||||
return air_template(deviceId)
|
return air_template(deviceId)
|
||||||
case _:
|
case _:
|
||||||
return common_template(deviceId)
|
return common_template(deviceId)
|
||||||
|
|
||||||
|
|
||||||
|
# 监控视频接口
|
||||||
|
def get_video_url(username):
|
||||||
|
return f"http://192.168.1.27:8888/live/xumu_{username}.live.mp4"
|
||||||
|
|
5
xumu.py
5
xumu.py
|
@ -26,6 +26,11 @@ class Device(BaseModel):
|
||||||
type: int = None
|
type: int = None
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/api/xumu/video")
|
||||||
|
async def data_query(username):
|
||||||
|
return BaseResponse(data=get_video_url(username))
|
||||||
|
|
||||||
|
|
||||||
# 数据查询接口
|
# 数据查询接口
|
||||||
@app.get("/api/xumu/data/query")
|
@app.get("/api/xumu/data/query")
|
||||||
async def data_query(deviceId):
|
async def data_query(deviceId):
|
||||||
|
|
Loading…
Reference in New Issue