POST 切换 Eagle 打开的资源库。

参数:

参数 说明
libraryPath 资源库路径

**

范例代码:

  1. var data = {
  2. "libraryPath": "/Users/augus/Pictures/Design.library"
  3. };
  4. var requestOptions = {
  5. method: 'POST',
  6. body: JSON.stringify(data),
  7. redirect: 'follow'
  8. };
  9. fetch("http://localhost:41595/api/library/switch", requestOptions)
  10. .then(response => response.json())
  11. .then(result => console.log(result))
  12. .catch(error => console.log('error', error));

返回结果:

  1. {
  2. "status": "success"
  3. }