For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Library

Library API 允許您取得目前開啟的 Eagle 資源庫相關資訊。

端點概覽

方法
端點
說明

GET

/api/v2/library/info

取得資源庫中繼資料

GET

/api/v2/library/history

取得歷史資料庫列表

POST

/api/v2/library/switch

切換至指定資料庫

GET

/api/v2/library/icon

取得資料庫圖示


GET /api/v2/library/info

回傳目前開啟的 Eagle 資源庫中繼資料,包括名稱、路徑和設定。

回應

{
    "status": "success",
    "data": {
        "name": "My Design Library",
        "path": "D:\\Eagle Libraries\\My Design Library.library",
        "modificationTime": 1700000000000,
        "applicationVersion": "4.0",
        "folders": [],
        "smartFolders": [],
        "quickAccess": [],
        "tagGroups": []
    }
}

範例


GET /api/v2/library/history

取得歷史資料庫列表。回傳分頁結果。

查詢參數

  • offset integer(可選)— 分頁偏移量,預設 0

  • limit integer(可選)— 分頁限制,預設 50,最大 1000

回應

範例


POST /api/v2/library/switch

切換至指定資料庫。

請求主體

  • libraryPath string(必填)— 要切換的資料庫路徑

回應

範例


GET /api/v2/library/icon

取得資料庫圖示。

查詢參數

  • libraryPath string(必填)— 資料庫路徑

回應

回傳圖示的圖片資料。

範例


Library 屬性

資源庫物件包含以下屬性:

屬性
類型
說明

name

string

資源庫顯示名稱

path

string

.library 目錄的完整路徑

modificationTime

integer

最後修改時間戳記

applicationVersion

string

建立此資源庫的 Eagle 版本

folders

Object[]

頂層資料夾結構

smartFolders

Object[]

智慧型資料夾設定

quickAccess

Object[]

快速存取項目

tagGroups

Object[]

標籤群組定義

Last updated