> For the complete documentation index, see [llms.txt](https://developer.eagle.cool/plugin-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.eagle.cool/plugin-api/zh-tw/tutorial/get-eagle-data.md).

# 取得數據

你可以透過 Eagle Plugin API 提供的方法存取儲存在 Eagle 應用的各種數據，比如`檔案`、`資料夾`、`資源庫`等，這裏有一些簡單的範例：

## **範例一：取得當前應用選中的檔案**

```javascript
let selected = await eagle.item.getSelected();
console.log(selected);
```

## **範例二：取得指定條件之檔案**

```javascript
let items = await eagle.item.get({
    ids: [],
    isSelected: true,
    isUnfiled: true,
    isUntagged: true,
    keywords: [""],
    ext: "",
    tags: [],
    folders: [],
    shape: "square",
    rating: 5,
    annotation: "",
    url: ""
});

```

## **範例三：取得當前應用選中的資料夾**

```javascript
let folders = await eagle.folder.getSelected();
```

除上述外，Eagle Plugin API 還提供許多不同的 API 取得資訊，請點擊下方連結查看完整資訊：

* [資源庫](/plugin-api/zh-tw/api/library.md)
* [項目](/plugin-api/zh-tw/api/item.md)
* [資料夾](/plugin-api/zh-tw/api/folder.md)
* [應用](/plugin-api/zh-tw/api/app.md)
* [作業系統](/plugin-api/zh-tw/api/os.md)
* [通知](/plugin-api/zh-tw/api/notification.md)
* [對話框](/plugin-api/zh-tw/api/dialog.md)
* [剪貼板](/plugin-api/zh-tw/api/clipboard.md)
* [日誌](/plugin-api/zh-tw/api/log.md)
