公开接口API说明(公测)461
发表时间:2022-03-24 15:30来源:微星智控 一.接口说明 基于本地127.0.0.1:6000端口进行通讯 数据封装使用JSON封装 二.基础接口 1.获取在线手机
发送示例: { "Action": "GetDevices" } 返回Json值: { "Action": "GetDevices", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81" //手机序列号 }, { "Key": "10a5cc1c" } ] } 2.返回手机主页
发送示例: { "Action": "Home", "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回Json值: { "Action": "Home", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 3.返回手机上页
发送示例: { "Action": "Back", "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回Json值: { "Action": "Back", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 4.点击屏幕坐标
发送示例: { "Action": "ClickPoint", "X1": 200, "Y1": 300, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "ClickPoint", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 5.点击屏幕比例坐标
发送示例: { "Action": "ClickPercent", "X1P": "20%", "Y1P": "30%", "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "ClickPercent", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 6.滑动屏幕坐标
发送示例: { "Action": "SwipePoint", "X1": 200, "Y1": 300, "X2": 200, "Y2": 800, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "SwipePoint", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 5.滑动屏幕比例坐标
发送示例: { "Action": "SwipePercent", "X1P": "50%", "Y1P": "30%", "X2P": "50%", "Y2P": "80%", "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "SwipePercent", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 三.图像识别接口 1.全屏幕查找图片
发送示例: { "Action": "FindPicture", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "FindPicture", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 2.屏幕指定坐标区域查找图片
发送示例: { "Action": "FindPicturePointArea", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "X1": 10, "Y1": 20, "AreaWidth": 200, "AreaHeight": 300, "AreaExpansion": 10, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "FindPicturePointArea", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 3.屏幕指定比例区域查找图片
发送示例: { "Action": "FindPicturePercentArea", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "X1P": "10%", "Y1P": "20%", "WidthP": "20%", "HeightP": "30%", "AreaExpansion": 10, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "FindPicturePercentArea", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 4.全屏幕点击图片
发送示例: { "Action": "ClickPicture", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "ClickPicture", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 5.屏幕指定坐标区域点击图片
发送示例: { "Action": "ClickPicturePointArea", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "X1": 10, "Y1": 20, "AreaWidth": 200, "AreaHeight": 300, "AreaExpansion": 10, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "ClickPicturePointArea", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 6.屏幕指定比例区域查找图片
发送示例: { "Action": "ClickPicturePercentArea", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "X1P": "10%", "Y1P": "20%", "WidthP": "20%", "HeightP": "30%", "AreaExpansion": 10, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "ClickPicturePercentArea", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 四.颜色识别接口 1.全屏幕查找颜
发送示例: { "Action": "FindColor", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "FindColor", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 2.屏幕指定坐标区域查找图片
发送示例: { "Action": "FindPicturePointArea", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "X1": 10, "Y1": 20, "AreaWidth": 200, "AreaHeight": 300, "AreaExpansion": 10, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "FindPicturePointArea", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 3.屏幕指定比例区域查找图片
发送示例: { "Action": "FindPicturePercentArea", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "X1P": "10%", "Y1P": "20%", "WidthP": "20%", "HeightP": "30%", "AreaExpansion": 10, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "FindPicturePercentArea", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 4.全屏幕点击图片
发送示例: { "Action": "ClickPicture", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "ClickPicture", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 5.屏幕指定坐标区域点击图片
发送示例: { "Action": "ClickPicturePointArea", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "X1": 10, "Y1": 20, "AreaWidth": 200, "AreaHeight": 300, "AreaExpansion": 10, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "ClickPicturePointArea", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 6.屏幕指定比例区域查找图片
发送示例: { "Action": "ClickPicturePercentArea", "TmpImagePath": "C:\\微星智控\\Pic\\637751235287079959.jpg", "TmpSourceWidth": 720, "TmpSourceHeight": 1520, "DesignWidth": 1080, "DesignHeight": 1920, "X1P": "10%", "Y1P": "20%", "WidthP": "20%", "HeightP": "30%", "AreaExpansion": 10, "Devices": [ { "Key": "1095cc81" }, { "Key": "10a5cc1c" } ] } 返回值示例: { "Action": "ClickPicturePercentArea", "Success": true,//执行成功 "Devices": [ { "Key": "1095cc81", //手机序列号 "DeviceResult":true }, { "Key": "10a5cc1c", "DeviceResult":true } ] } 五.文字识别接口(待开放) 六.元素识别接口(待开放) |