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();Last updated