# データ取得

Eagle Plugin API で提供される方法を使用して、Eagle アプリケーションに保存されているさまざまなデータにアクセスできます。たとえば、`ファイル`、`フォルダー`、`リソースライブラリ` などです。以下は簡単な例です。

## **例1：現在のアプリケーションで選択されたファイルを取得する**

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

## **例2：指定条件のファイルを取得する**

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

```

## **例3：現在のアプリケーションで選択されたフォルダを取得する**

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

上記に加えて、Eagle Plugin API はさまざまな API を提供して情報を取得します。以下のリンクをクリックして完全な情報を表示してください：

* [リソースライブラリ](/plugin-api/ja-jp/api/library.md)
* [アイテム](/plugin-api/ja-jp/api/item.md)
* [フォルダー](/plugin-api/ja-jp/api/folder.md)
* [アプリ](/plugin-api/ja-jp/api/app.md)
* [オペレーティングシステム](/plugin-api/ja-jp/api/os.md)
* [通知](/plugin-api/ja-jp/api/notification.md)
* [ダイアログ](/plugin-api/ja-jp/api/dialog.md)
* [クリップボード](/plugin-api/ja-jp/api/clipboard.md)
* [ログ](/plugin-api/ja-jp/api/log.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.eagle.cool/plugin-api/ja-jp/tutorial/get-eagle-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
