> 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-cn/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-cn/api/library.md)
* [项目](/plugin-api/zh-cn/api/item.md)
* [文件夹](/plugin-api/zh-cn/api/folder.md)
* [应用](/plugin-api/zh-cn/api/app.md)
* [操作系统](/plugin-api/zh-cn/api/os.md)
* [通知](/plugin-api/zh-cn/api/notification.md)
* [对话框](/plugin-api/zh-cn/api/dialog.md)
* [剪切板](/plugin-api/zh-cn/api/clipboard.md)
* [日志](/plugin-api/zh-cn/api/log.md)
