/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:

var data = {
  "items": [
      {
        "url": "https://cdn.dribbble.com/users/674925/screenshots/12020761/media/6420a7ec85751c11e5254282d6124950.png",
          "name": "Work",
          "website": "https://dribbble.com/shots/12020761-Work",
          "tags": ["Illustration", "Design"],
          "modificationTime": 1591325171767,
      "headers": {
        "referer": "dribbble.com"
      }
      },
      {
          "url": "https://cdn.dribbble.com/users/674925/screenshots/12061400/media/71da9ba40c47f09d8cd6953d661e61fd.png",
          "name": "Work2",
          "website": "https://dribbble.com/shots/12061400-work2",
          "tags": ["Illustration", "Design"],
          "modificationTime": 1591325171766,
      "headers": {
        "referer": "dribbble.com"
      }
      }
  ],
  "folderId": "KAY6NTU6UYI5Qa"
};

var requestOptions = {
  method: 'POST',
    body: JSON.stringify(data),
  redirect: 'follow'
};

fetch("http://localhost:41595/api/item/addFromURLs", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Results Returned:

{
    "status": "success"
}

Last updated