This commit is contained in:
xyj 2024-01-25 17:10:40 +08:00
parent bbc63afc29
commit e5a0a6b18b
2 changed files with 12 additions and 0 deletions

View File

@ -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"

View File

@ -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):