[REST API]操作屏幕类[Inputs]-滑动事件

描述:

模拟用户操作的触控事件,可以实现单点或者多点操作的滑动事件。 坐标格式:在数组中的第一个坐标组为按下坐标;在数组中的最后一个坐标组为弹起坐标;中间数组为滑动坐标

对应JS API:


var device = Device.getMain();
device.swipe ([[124,256,30],[224,296,100],[324,356,1]]);

是否支持多设备:

支持

请求方式:

POST
http://IP:8090/TotalControl/v1/devices:device/screen/inputs

参数:

参数名 类型 必选 描述
token string Y Total Control TOKEN
:device string Y 主控设备对象值 id
coord string Y 数组坐标点

请求示例:


示例一:
http://127.0.0.1:8090/TotalControl/v1/devices/device@1116106541/screen/inputs?token=270eq7lXQK8bXYsJ&coord=[[124,256,30],[224,296,100],[324,356,1]]
示例二:
http://127.0.0.1:8090/TotalControl/v1/devices/device@1116106541/screen/inputs
{
"token":"270eq7lXQK8bXYsJ",
"coord":"[[124,256,30],[224,296,100],[324,356,1]]"
}

返回示例:


{
    "status":true
}

返回字段说明:

字段 类型 描述
status boolean true:成功; false:失败

猜你喜欢

转载自blog.csdn.net/lemon5814/article/details/83149964