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));

返回结果:

  1. {
  2. "status": "success",
  3. "data": {
  4. "id": "KBKE04XSTXR7I",
  5. "name": "Rosto",
  6. "size": 21950,
  7. "ext": "jpg",
  8. "tags": [],
  9. "folders": [
  10. "KBKE0240V8OII"
  11. ],
  12. "isDeleted": false,
  13. "url": "https://www.pinterest.com/pin/380343131025657796/",
  14. "annotation": "",
  15. "modificationTime": 1592460728472,
  16. "width": 623,
  17. "height": 623,
  18. "noThumbnail": true,
  19. "lastModified": 1592460776990,
  20. "palettes": [
  21. {
  22. "color": [
  23. 132,
  24. 236,
  25. 244
  26. ],
  27. "ratio": 49,
  28. "$$hashKey": "object:604"
  29. },
  30. {
  31. "color": [
  32. 249,
  33. 220,
  34. 221
  35. ],
  36. "ratio": 24,
  37. "$$hashKey": "object:605"
  38. },
  39. {
  40. "color": [
  41. 250,
  42. 149,
  43. 150
  44. ],
  45. "ratio": 12,
  46. "$$hashKey": "object:606"
  47. },
  48. {
  49. "color": [
  50. 8,
  51. 45,
  52. 142
  53. ],
  54. "ratio": 11,
  55. "$$hashKey": "object:607"
  56. },
  57. {
  58. "color": [
  59. 189,
  60. 76,
  61. 91
  62. ],
  63. "ratio": 1.16,
  64. "$$hashKey": "object:608"
  65. },
  66. {
  67. "color": [
  68. 174,
  69. 214,
  70. 221
  71. ],
  72. "ratio": 0.39,
  73. "$$hashKey": "object:609"
  74. }
  75. ]
  76. }
  77. }