GET 取得特定文件基本信息,包含文件名、标签、分类、文件夹、分辨率等。

参数:

参数 说明
id 文件 ID

**

范例代码:

  1. var requestOptions = {
  2. method: 'GET',
  3. redirect: 'follow'
  4. };
  5. fetch("http://localhost:41595/api/item/info?id=KBHG6KA0Y5S9W", requestOptions)
  6. .then(response => response.json())
  7. .then(result => console.log(result))
  8. .catch(error => console.log('error', error));

返回结果:

json { "status": "success", "data": { "id": "KBKE04XSTXR7I", "name": "Rosto", "size": 21950, "ext": "jpg", "tags": [], "folders": [ "KBKE0240V8OII" ], "isDeleted": false, "url": "https://www.pinterest.com/pin/380343131025657796/", "annotation": "", "modificationTime": 1592460728472, "width": 623, "height": 623, "noThumbnail": true, "lastModified": 1592460776990, "palettes": [ { "color": [ 132, 236, 244 ], "ratio": 49, "$$hashKey": "object:604" }, { "color": [ 249, 220, 221 ], "ratio": 24, "$$hashKey": "object:605" }, { "color": [ 250, 149, 150 ], "ratio": 12, "$$hashKey": "object:606" }, { "color": [ 8, 45, 142 ], "ratio": 11, "$$hashKey": "object:607" }, { "color": [ 189, 76, 91 ], "ratio": 1.16, "$$hashKey": "object:608" }, { "color": [ 174, 214, 221 ], "ratio": 0.39, "$$hashKey": "object:609" } ] } }s