Pinch
curl --request POST \
--url https://api.example.com/v1/phones/{phone_id}/pinchimport requests
url = "https://api.example.com/v1/phones/{phone_id}/pinch"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/phones/{phone_id}/pinch', 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://api.example.com/v1/phones/{phone_id}/pinch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/phones/{phone_id}/pinch"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/phones/{phone_id}/pinch")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/phones/{phone_id}/pinch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyGestures
Pinch
Pinch/zoom/rotate gestures
POST
/
v1
/
phones
/
{phone_id}
/
pinch
Pinch
curl --request POST \
--url https://api.example.com/v1/phones/{phone_id}/pinchimport requests
url = "https://api.example.com/v1/phones/{phone_id}/pinch"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v1/phones/{phone_id}/pinch', 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://api.example.com/v1/phones/{phone_id}/pinch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/phones/{phone_id}/pinch"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/phones/{phone_id}/pinch")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/phones/{phone_id}/pinch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyExecute a pinch gesture for zooming or rotating.
Request
curl -X POST https://api.tapkit.ai/v1/phones/{phone_id}/pinch \
-H "X-API-Key: joot_your_api_key" \
-H "Content-Type: application/json" \
-d '{"x": 500, "y": 1000, "action": "pinch_out", "duration_ms": 1000}'
Request Body
{
"x": 500,
"y": 1000,
"action": "pinch_out",
"duration_ms": 1000
}
| Field | Type | Default | Description |
|---|---|---|---|
x | integer | required | Center X coordinate |
y | integer | required | Center Y coordinate |
action | string | required | Pinch action type |
duration_ms | integer | 1000 | Gesture duration in milliseconds |
Action Types
| Action | Description |
|---|---|
pinch_out | Zoom in (fingers apart) |
pinch_in | Zoom out (fingers together) |
rotate_cw | Rotate clockwise |
rotate_ccw | Rotate counter-clockwise |
Related Endpoints
- Pinch by Description - Pinch using natural language
- Double Tap - Alternative zoom method
⌘I