# 取得数据

你可以通过 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 获取信息，请点击下方链接查看完整信息：

* [资源库](https://developer.eagle.cool/plugin-api/zh-cn/api/library)
* [项目](https://developer.eagle.cool/plugin-api/zh-cn/api/item)
* [文件夹](https://developer.eagle.cool/plugin-api/zh-cn/api/folder)
* [应用](https://developer.eagle.cool/plugin-api/zh-cn/api/app)
* [操作系统](https://developer.eagle.cool/plugin-api/zh-cn/api/os)
* [通知](https://developer.eagle.cool/plugin-api/zh-cn/api/notification)
* [对话框](https://developer.eagle.cool/plugin-api/zh-cn/api/dialog)
* [剪切板](https://developer.eagle.cool/plugin-api/zh-cn/api/clipboard)
* [日志](https://developer.eagle.cool/plugin-api/zh-cn/api/log)
