summaryrefslogtreecommitdiff
path: root/RemoveTagDefinition.cs
diff options
context:
space:
mode:
Diffstat (limited to 'RemoveTagDefinition.cs')
-rw-r--r--RemoveTagDefinition.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/RemoveTagDefinition.cs b/RemoveTagDefinition.cs
new file mode 100644
index 0000000..e28d7f9
--- /dev/null
+++ b/RemoveTagDefinition.cs
@@ -0,0 +1,16 @@
+using HyperBooru.ApiClient;
+using System.Management.Automation;
+
+namespace HyperBooru.PowerShell;
+
+[Alias("rhbtd")]
+[Cmdlet(VerbsCommon.Remove, "HyperBooruTagDefinition")]
+public class RemoveTagDefinitionCmdlet : PSCmdlet {
+ [Parameter(Mandatory = true)] public required HBSession Session { get; set; }
+ [Parameter(Mandatory = true)] public required Guid TagDefinitionId { get; set; }
+
+ protected override void ProcessRecord() =>
+ Session.Tag.DeleteTagDefinitionAsync(TagDefinitionId)
+ .GetAwaiter()
+ .GetResult();
+}