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"],
description: "Group description" // Eagle 4.0 build18+
});Instance Methods
save()
Saves changes to the tag group.
Returns
Promise<tagGroup: Object>- the result of the save operation.
remove()
Removes the tag group.
Returns
Promise<result: boolean>- whether the removal was successful.
addTags(options)
Incrementally adds tags to the group without needing to pass the complete tags array.
optionsObject - Option parameterstagsstring[] - Array of tag names to addremoveFromSourceboolean (optional) - Whether to remove tags from their original groups, defaults tofalsefalse: Only add tags (tags can exist in multiple groups)true: Move tags (remove from original groups)
Returns
Promise<tagGroup: Object>- The updated tag group
removeTags(options)
Removes specified tags from the group.
optionsObject - Option parameterstagsstring[] - Array of tag names to remove
Returns
Promise<tagGroup: Object>- The updated tag group
Warning: This method only removes tags from the group. It does not delete the tags themselves or affect tags on items.
Last updated