/api/item/addFromURLs
POST Add multiple images from URLs to Eagle App.
Parameter
Description
items
The array object made up of multiple items (See the description below)
folderId
If the parameter is defined, images will be added to the corresponding folder.
Description of the Item parameter:
Parameter
Description
url
Required,the URL of images to be added. Supports httphttpsbase64
name
Required,The name of the images you to be added.
website
The Address of the source of images.
annotation
The annotation for the images.
tags
Tags for the images.
modificationTime
The creation date of the images. The parameter can be used to alter the images' sorting order in Eagle.
headers
Optional, customize the HTTP headers properties, this could be used to circumvent the security of certain websites.
Sample Code:
1
var data = {
2
"items": [
3
{
4
"url": "https://cdn.dribbble.com/users/674925/screenshots/12020761/media/6420a7ec85751c11e5254282d6124950.png",
5
"name": "Work",
6
"website": "https://dribbble.com/shots/12020761-Work",
7
"tags": ["Illustration", "Design"],
8
"modificationTime": 1591325171767,
9
"headers": {
10
"referer": "dribbble.com"
11
}
12
},
13
{
14
"url": "https://cdn.dribbble.com/users/674925/screenshots/12061400/media/71da9ba40c47f09d8cd6953d661e61fd.png",
15
"name": "Work2",
16
"website": "https://dribbble.com/shots/12061400-work2",
17
"tags": ["Illustration", "Design"],
18
"modificationTime": 1591325171766,
19
"headers": {
20
"referer": "dribbble.com"
21
}
22
}
23
],
24
"folderId": "KAY6NTU6UYI5Qa"
25
};
26
27
var requestOptions = {
28
method: 'POST',
29
body: JSON.stringify(data),
30
redirect: 'follow'
31
};
32
33
fetch("http://localhost:41595/api/item/addFromURLs", requestOptions)
34
.then(response => response.json())
35
.then(result => console.log(result))
36
.catch(error => console.log('error', error));
Copied!
Results Returned:
1
{
2
"status": "success"
3
}
Copied!
Last modified 9mo ago
Copy link