tagGroup(タグ グループ)
eagle.tagGroup APIを通じて、現在のアプリケーション内のタググループに簡単にアクセスできます。
// すべてのタググループを取得
const tagGroups = (await eagle.tagGroup.get());メソッド
get()
すべてのタググループを取得します。
戻り値
Promise<tagGroups: Object[]>- tagGroupsのクエリ結果。
const tagGroups = (await eagle.tagGroup.get());create(options)
すべてのタググループを取得します。
戻り値
Promise<tagGroup: Object>- 新しく作成されたタググループ
await eagle.tagGroup.create({
name: "new group",
color: "red",
tags: ["tag1", "tag2"]
});インスタンスメソッド
save()
タググループの変更を保存します。
戻り値
Promise<tagGroup: Object>- 保存結果。
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()
タググループを削除します。
戻り値
Promise<result: boolean>- 削除が成功したかどうか
const tagGroups = (await eagle.tagGroup.get());
const tagGroup = tagGroups[0];
await tagGroup.remove();最終更新