phone operate - drag
curl --request POST \
--url https://user.pmock.com/api/open/api/phone/action/drag \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"posType": 1,
"posType2": 1,
"query": [
"<string>"
],
"query2": [
"<string>"
],
"pos1": [
123
],
"pos2": [
123
],
"range1": [
123
],
"range2": [
123
],
"duration": 123,
"durationRange": [
123
]
}
'import requests
url = "https://user.pmock.com/api/open/api/phone/action/drag"
payload = {
"code": "<string>",
"posType": 1,
"posType2": 1,
"query": ["<string>"],
"query2": ["<string>"],
"pos1": [123],
"pos2": [123],
"range1": [123],
"range2": [123],
"duration": 123,
"durationRange": [123]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
posType: 1,
posType2: 1,
query: ['<string>'],
query2: ['<string>'],
pos1: [123],
pos2: [123],
range1: [123],
range2: [123],
duration: 123,
durationRange: [123]
})
};
fetch('https://user.pmock.com/api/open/api/phone/action/drag', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://user.pmock.com/api/open/api/phone/action/drag",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>',
'posType' => 1,
'posType2' => 1,
'query' => [
'<string>'
],
'query2' => [
'<string>'
],
'pos1' => [
123
],
'pos2' => [
123
],
'range1' => [
123
],
'range2' => [
123
],
'duration' => 123,
'durationRange' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://user.pmock.com/api/open/api/phone/action/drag"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"posType\": 1,\n \"posType2\": 1,\n \"query\": [\n \"<string>\"\n ],\n \"query2\": [\n \"<string>\"\n ],\n \"pos1\": [\n 123\n ],\n \"pos2\": [\n 123\n ],\n \"range1\": [\n 123\n ],\n \"range2\": [\n 123\n ],\n \"duration\": 123,\n \"durationRange\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://user.pmock.com/api/open/api/phone/action/drag")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"posType\": 1,\n \"posType2\": 1,\n \"query\": [\n \"<string>\"\n ],\n \"query2\": [\n \"<string>\"\n ],\n \"pos1\": [\n 123\n ],\n \"pos2\": [\n 123\n ],\n \"range1\": [\n 123\n ],\n \"range2\": [\n 123\n ],\n \"duration\": 123,\n \"durationRange\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://user.pmock.com/api/open/api/phone/action/drag")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"posType\": 1,\n \"posType2\": 1,\n \"query\": [\n \"<string>\"\n ],\n \"query2\": [\n \"<string>\"\n ],\n \"pos1\": [\n 123\n ],\n \"pos2\": [\n 123\n ],\n \"range1\": [\n 123\n ],\n \"range2\": [\n 123\n ],\n \"duration\": 123,\n \"durationRange\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"traceId": "<string>",
"code": 123,
"msg": "<string>",
"status": "finish",
"data": 123
}Phone-operate
phone operate - drag
phone operate - drag
POST
/
open
/
api
/
phone
/
action
/
drag
phone operate - drag
curl --request POST \
--url https://user.pmock.com/api/open/api/phone/action/drag \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"posType": 1,
"posType2": 1,
"query": [
"<string>"
],
"query2": [
"<string>"
],
"pos1": [
123
],
"pos2": [
123
],
"range1": [
123
],
"range2": [
123
],
"duration": 123,
"durationRange": [
123
]
}
'import requests
url = "https://user.pmock.com/api/open/api/phone/action/drag"
payload = {
"code": "<string>",
"posType": 1,
"posType2": 1,
"query": ["<string>"],
"query2": ["<string>"],
"pos1": [123],
"pos2": [123],
"range1": [123],
"range2": [123],
"duration": 123,
"durationRange": [123]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
code: '<string>',
posType: 1,
posType2: 1,
query: ['<string>'],
query2: ['<string>'],
pos1: [123],
pos2: [123],
range1: [123],
range2: [123],
duration: 123,
durationRange: [123]
})
};
fetch('https://user.pmock.com/api/open/api/phone/action/drag', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://user.pmock.com/api/open/api/phone/action/drag",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'code' => '<string>',
'posType' => 1,
'posType2' => 1,
'query' => [
'<string>'
],
'query2' => [
'<string>'
],
'pos1' => [
123
],
'pos2' => [
123
],
'range1' => [
123
],
'range2' => [
123
],
'duration' => 123,
'durationRange' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://user.pmock.com/api/open/api/phone/action/drag"
payload := strings.NewReader("{\n \"code\": \"<string>\",\n \"posType\": 1,\n \"posType2\": 1,\n \"query\": [\n \"<string>\"\n ],\n \"query2\": [\n \"<string>\"\n ],\n \"pos1\": [\n 123\n ],\n \"pos2\": [\n 123\n ],\n \"range1\": [\n 123\n ],\n \"range2\": [\n 123\n ],\n \"duration\": 123,\n \"durationRange\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://user.pmock.com/api/open/api/phone/action/drag")
.header("Content-Type", "application/json")
.body("{\n \"code\": \"<string>\",\n \"posType\": 1,\n \"posType2\": 1,\n \"query\": [\n \"<string>\"\n ],\n \"query2\": [\n \"<string>\"\n ],\n \"pos1\": [\n 123\n ],\n \"pos2\": [\n 123\n ],\n \"range1\": [\n 123\n ],\n \"range2\": [\n 123\n ],\n \"duration\": 123,\n \"durationRange\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://user.pmock.com/api/open/api/phone/action/drag")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"code\": \"<string>\",\n \"posType\": 1,\n \"posType2\": 1,\n \"query\": [\n \"<string>\"\n ],\n \"query2\": [\n \"<string>\"\n ],\n \"pos1\": [\n 123\n ],\n \"pos2\": [\n 123\n ],\n \"range1\": [\n 123\n ],\n \"range2\": [\n 123\n ],\n \"duration\": 123,\n \"durationRange\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"traceId": "<string>",
"code": 123,
"msg": "<string>",
"status": "finish",
"data": 123
}Body
application/json
phone code
位置类型:1=节点,2=固定坐标,3=范围位置 position1 type:1=query,2=coordinate,3=coordinate range
位置类型:1=节点,2=固定坐标,3=范围位置 position2 type:1=query,2=coordinate,3=coordinate range
query1:[key=value,key=value,...]
query2:[key=value,key=value,...]
坐标 X,Y coordinate1:[X,Y]
x2,y2 coordinate2:[X,Y]
[x1,y1,x2,y2] coordinate range1:[X1,Y1,X2,Y2]
[x1,y1,x2,y2] coordinate range2:[X1,Y1,X2,Y2]
duration
持续时长范围 duration range
⌘I
