接口 | 地址 | 请求方式 | 请求体 | 返回参数 |
---|---|---|---|---|
上传blog接口 | /api/blog | post | image (MultipartFile): 博客的图片文件,必须上传。 title (String): 博客的标题,必填。 titleSrc (String): 博客标题的来源或附加信息,必填。 content (String): 博客的正文内容,必填。 |
访问博客的url |
根据id获取blog | /api/blog/{id} | get | 无请求体,id参数通过path上传 | { "id": 123, "userId": 456, "title": "Example Blog Title", "titleSrc": "Source URL", "content": "This is an example blog content." } |
收藏/取消收藏 博客 | /api/blog/like | post | { "blogId": 456, // 博客ID "likeStatus" // 是否收藏 0:未收藏 1:已收藏 } |
|
获取某人收藏的博客列表 | /api/user/like/blog | get | /api/user/like/blog | list下边这个 { "id": 123, "userId": 456, "title": "Example Blog Title", "titleSrc": "Source URL", "content": "This is an example blog content." } |
获取博客被收藏的个数 | /api/blog/like/count | get | /api/blog/like/count?blogId=456 | 数字 |
获取我发布的博客 | /api/user/blog | get | { "id": 123, "userId": 456, "title": "Example Blog Title", "titleSrc": "Source URL", "content": "This is an example blog content." } |
|
获取全部博客 | /api/blog/all | get | { "id": 123, "userId": 456, "title": "Example Blog Title", "titleSrc": "Source URL", "content": "This is an example blog content." } |
|
查看某个人是否收藏过某个文档 | /api/user/has-liked-article | get | /api/user/has-liked-article?blogId= | sboolean |
接口 | 地址 | 请求方式 | 请求体 | 返回参数 |
---|---|---|---|---|
登录 | /api/user/login/wechatLogin | post | /api/user/login/wechatLogin?code=&openId= | token |
添加用户信息 | /api/user/info | post | { "id": null, "name": null, "account": null, "avatar": null, "password": null, "wechatId": "wechat_id_value" } |
无 |
获取用户 信息 | /api/user/info | get | 空 | { "id": null, "name": null, "account": null, "avatar": null, "password": null, "wechatId": "wechat_id_value" } |
接口 | 地址 | 请求方式 | 请求体 | 返回参数 |
---|---|---|---|---|
保存宠物 | /api/pet | post | { "id": 1, , "name": "Buddy", "gender": true, "age": 5, "weight": 15000, "petType": "Dog", "avatar": "path/to/avatar.jpg", "description": "A friendly and energetic dog who loves long walks.", "feedTimeGap": "8 hours", "breakfast": "08:00", "lunch": "12:00", "dinner": "20:00", "deviceId": "device123", "avatarFile": null } | |
获取宠物信息 | /api/pet | get | { "id": 1, "userId": 1001, "name": "Buddy", "gender": true, "age": 5, "weight": 15000, "petType": "Dog", "avatar": "path/to/avatar.jpg", "description": "A friendly and energetic dog who loves long walks.", "feedTimeGap": "8 hours", "breakfast": "08:00", "lunch": "12:00", "dinner": "20:00", "deviceId": "device123", "avatarFile": null } | |
删除宠物 | /api/pet/delete | post | /api/pet/delete?id= | void |
获取某人的宠物列表 | /api/user/pet | get |
接口 | 地址 | 请求方式 | 请求体 | 返回参数 |
---|---|---|---|---|
检测碗中食物 | /api/action/food/detect/bowl | get | /api/action/food/detect/bowl?deviceId= | "还有食物/没有食物" |
检测粮仓内食物 | /api/action/food/detect/silo | get | /api/action/food/detect/silo?deviceid= | "还有食物/没有食物" |
喂食 | /api/action/start | post | /api/action/start?deviceId=&status=1/0(1开始0停止) | void |
设置喂食计划 | /api/action/feedPlan | pos | { "deviceId": "device123", "breakfast": "18:00", "lunch": "18:00", "dinner": "18:00", "duration": "15" } |
void |
移动摄像头 | /api/action/camera/move | post | /api/action/camera/move?deviceId&direction direction 为-1表示左为1表示右 |
void |
开启视频监控 | /api/action/camera/regular | get | deviceId status |
"rtmp://xxxx" |