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
  • Methods
  • get()
  • create(options)
  • save()
  • remove()
  1. API Reference

tagGroup

The eagle.tagGroup API allows easy access to the tag groups in the current application.

// Get all tag groups
const tagGroups = (await eagle.tagGroup.get());

Methods

get()

Retrieves all tag groups.

  • Returns Promise<tagGroups: Object[]> - the query result for tagGroups.

const tagGroups = (await eagle.tagGroup.get());

create(options)

Creates a new tag group.

  • Returns Promise<tagGroup: Object> - the newly created tag group.

await eagle.tagGroup.create({
    name: "new group",
    color: "red",
    tags: ["tag1", "tag2"]
});

Instance Methods

save()

Saves changes to the tag group.

  • Returns Promise<tagGroup: Object> - the result of the save operation.

const tagGroups = (await eagle.tagGroup.get());
const tagGroup = tagGroups[0];

tagGroup.name = "new name";
tagGroup.color = "red"; // red, orange, yellow, green, aqua, blue, purple, pink
tagGroup.tags = ["tag1", "tag2"];

await tagGroup.save();

remove()

Removes the tag group.

  • Returns Promise<result: boolean> - whether the removal was successful.

const tagGroups = (await eagle.tagGroup.get());
const tagGroup = tagGroups[0];

await tagGroup.remove();
PrevioustagNextlibrary

Last updated 3 months ago