Modify Data

You can directly modify the results obtained using the Eagle Plugin API method. To save the modified results, just call the save() method of the result object. Here are some simple examples:

Example 1: Modify the selected file of the current application

// Get the currently selected file in the Eagle app let items = await eagle.item.getSelected(); let item = items[0];  // Modify tags item.tags = ['tag1', 'tag2'];  // Save changes await item.save(); 

Example 2: Modify folder properties

// Get the currently selected folder in the Eagle app let folder = (await eagle.folder.getSelected())[0];  // Modify properties folder.name = 'New Folder Name'; folder.description = 'New description...';  // Save changes await folder.save();
circle-check

Last updated