Plugin API
English
English
  • Getting Started
    • Introduction
    • Your First Plugin
    • File Structure Overview
    • Plugin Types
      • Window
      • Background Service
      • Format Extension
      • Inspector
    • Debug Plugin
  • Distribution
    • Prepare Plugin
    • Package Plugin
    • Publish Plugin
    • Update Plugin
    • Developer Policies
    • Plugin Icon Template
  • Developer Guide
    • manifest.json Configuration
    • Retrieve Data
    • Modify Data
    • Access Local Files
    • Issue Network Requests
    • Using Node.js Native API
    • Using Third-Party Modules
    • Multilingual (i18n)
    • Frameless Window
  • API Reference
    • event
    • item
    • folder
    • tag
    • tagGroup
    • library
    • window
    • app
    • os
    • screen
    • notification
    • contextMenu
    • dialog
    • clipboard
    • drag
    • shell
    • log
  • Extra Moudle
    • FFmpeg
Powered by GitBook
On this page
  • Example 1: Get the currently selected file in the application
  • Example 2: Get files by specified conditions
  • Example 3: Get the currently selected folder in the application
  1. Developer Guide

Retrieve Data

You can access various data stored in the Eagle application through methods provided by the Eagle Plugin API, such as files, folders, libraries, etc. Here are some simple examples:

Example 1: Get the currently selected file in the application

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

Example 2: Get files by specified conditions

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

Example 3: Get the currently selected folder in the application

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

In addition to the above, the Eagle Plugin API provides many different APIs for getting information. Please click the link below to view the complete information:

Previousmanifest.json ConfigurationNextModify Data

Last updated 2 years ago

Library
Item
Folder
App
Operating System
Notification
Dialog
Clipboard
Log