Put
Update a document hotspot
Parameters:
Example:
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=02608658TXrk4GRB" -d "type=link" -d "settings[x]=0" -d "settings[y]=0" -d "settings[w]=400" -d "settings[h]=100" -d "settings[name]=Google.com" -d "settings[tooltip]=Google.com" -d "settings[link]=https://www.google.com" "https://api.yumpu.com/2.0/document/hotspot.json"
Example:
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
'id' => '02784dc6chuNtFd2',
'type' => 'link',
'settings' => array(
'x' => 200,
'y' => 200,
'w' => 20,
'h' => 20,
'name' => 'google.com',
'tooltip' => 'google.com',
'link' => 'https://www.yumpu.com'
)
);
$hotspot = $yumpu->putDocumentHotspot($data);
print_r($hotspot);
Example:
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
id: '02608658TXrk4GRB',
page: 1,
type: 'link',
settings: {
x: 100,
y: 100,
w: 50,
h: 50,
name: 'google.com',
tooltip: 'google.com',
link: 'https://www.yumpu.com'
}
};
yumpu.putDocumentHotspot(parameters, function(statusCode, document){
console.log('Status: ' + statusCode);
console.log(document);
});
Example:
Yumpu y = new Yumpu("your access token");
String[] params = {"document_id=27109085", "type=link", "page=1"};
String[] settings = {"x=0", "y=0", "w=400", "h=400", "name=google.com", "tooltip=google.com", "link=https://www.yumpu.com"};
System.out.println(y.putDocumentHotspot(params, settings));
Whatever language you are using, the result will be the same.
{
"hotspot": [
{
"id": "02608658TXrk4GRB",
"document_id": "27219350",
"page": "1",
"type": "link",
"settings": {
"x": "0",
"y": "0",
"w": "400",
"h": "100",
"name": "google.com",
"tooltip": "google.com",
"link": "https://www.yumpu.com"
},
"create_date": "2014-10-01 08:53:57",
"update_date": "2014-10-01 09:09:00"
}
],
"state": "success",
"completed_in": "0.1644"
}
Last updated