获取文件列表
调用说明
文件的功能只有ios15和以上才支持
- 请求参数
参数 | 类型 | 说明 | 备注 |
---|---|---|---|
fun | 字符串 | /shortcut/file/get | 请求功能名 |
id | 字符串 | 设备id | 不允许多个 |
path | 字符串 | 路径 | 默认则是我的iPhone根目录 |
outtime | 布尔值 | 超时时间 | 返回数据的超时时间,单位毫秒,默认15秒 |
- httpGet请求示例
curl --request GET \
--url 'http://192.168.9.9:9911/api/shortcut/file/get?id=6C:8D:C1:67:04:29'
- httpPost请求示例
curl --request POST \
--url http://192.168.9.9:9911/api \
--header "content-type: multipart/form-data" \
--form "fun=/shortcut/file/get" \
--form "id=6C:8D:C1:67:04:29"
- httpPost json请求示例【websocket也可发送同样json请求】
curl --request POST \
--url http://192.168.9.9:9911/api \
--header 'Content-Type: application/json' \
--data '{
"fun": "/shortcut/file/get",
"data": {
"id": "6C:8D:C1:67:04:29"
}
}'
响应结果
{
"data": {
"list": [
{
"name": "test",
"ext": "bmp",
"size": "7 KB",
"create_time": "2024-10-07 15:12:09"
}
],
"code": 0,
"id": "6C:8D:C1:67:04:29",
"message": "成功"
},
"status": 200,
"message": "成功",
"msgid": 0,
"fun": "/shortcut/file/get"
}
- 响应data数据字段说明
list返回了所有获取的照片列表
字段 | 说明 | 备注 |
---|---|---|
album_name | 相册名 | 属于哪个相册 |
name | 文件名 | - |
ext | 扩展名 | - |
size | 文件大小 | - |
create_time | 创建时间 | - |