跳到主要内容

获取文件列表

调用说明

文件的功能只有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创建时间-