A
A
API
Search…
Put

Update a document hotspot

Parameters:

Name
Optional / Required
Data type
Description
Default
id
required
String
One of your document hotspot ids
type
required
String
Type can be link, video, audio or slideshow
settings[x]
required
Integer
x position of the document hotspot
settings[y]
required
Integer
y position of the document hotspot
settings[w]
required
Integer
width of the document hotspot
settings[h]
required
Integer
height of the document hotspot
settings[name]
required
String
a name for the document hotspot (min. length 5, max. length 50)
settings[tooltip]
required
String
a tooltip for the document hotspot (min. length 5, max. length 50)
settings[link]
optional
String
a url (valid URL)
settings[ source]
optional
String
youtube, vimeo, flickr, soundcloud
settings[source_id]
optional
String
youtube: a valid youtube video id vimeo: a valid vimeo video id flickr: a valid flickr id
settings[source_url]
optional
String
soundcloud: a valid soundcloud url
settings[autoplay]
optional
String
y or n
curl
PHP
JavaScript
Java
Example:
1
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" "http://api.yumpu.com/2.0/document/hotspot.json"
Copied!
Example:
1
require_once('../yumpu.php');
2
$yumpu = new Yumpu();
3
$data = array(
4
'id' => '02784dc6chuNtFd2',
5
'type' => 'link',
6
'settings' => array(
7
'x' => 200,
8
'y' => 200,
9
'w' => 20,
10
'h' => 20,
11
'name' => 'google.com',
12
'tooltip' => 'google.com',
13
'link' => 'https://www.yumpu.com'
14
)
15
);
16
$hotspot = $yumpu->putDocumentHotspot($data);
17
print_r($hotspot);
Copied!
Example:
1
var yumpu = require('yumpu');
2
yumpu.setToken('yourToken');
3
var parameters = {
4
id: '02608658TXrk4GRB',
5
page: 1,
6
type: 'link',
7
settings: {
8
x: 100,
9
y: 100,
10
w: 50,
11
h: 50,
12
name: 'google.com',
13
tooltip: 'google.com',
14
link: 'https://www.yumpu.com'
15
}
16
};
17
yumpu.putDocumentHotspot(parameters, function(statusCode, document){
18
console.log('Status: ' + statusCode);
19
console.log(document);
20
});
Copied!
Example:
1
Yumpu y = new Yumpu("your access token");
2
String[] params = {"document_id=27109085", "type=link", "page=1"};
3
String[] settings = {"x=0", "y=0", "w=400", "h=400", "name=google.com", "tooltip=google.com", "link=https://www.yumpu.com"};
4
System.out.println(y.putDocumentHotspot(params, settings));
Copied!
Whatever language you are using, the result will be the same.
1
{
2
"hotspot": [
3
{
4
"id": "02608658TXrk4GRB",
5
"document_id": "27219350",
6
"page": "1",
7
"type": "link",
8
"settings": {
9
"x": "0",
10
"y": "0",
11
"w": "400",
12
"h": "100",
13
"name": "google.com",
14
"tooltip": "google.com",
15
"link": "https://www.yumpu.com"
16
},
17
"create_date": "2014-10-01 08:53:57",
18
"update_date": "2014-10-01 09:09:00"
19
}
20
],
21
"state": "success",
22
"completed_in": "0.1644"
23
}
Copied!
Last modified 2yr ago