summaryrefslogtreecommitdiff
path: root/RemoveTagDefinition.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2026-05-18 16:59:16 +1000
committerJake Mannens <jake@asger.xyz>2026-05-18 16:59:16 +1000
commitab46387d4d02e30b171a7c2fa07947b41ec691a0 (patch)
tree0e3311e320de78476917e073d4f2ef954624a24a /RemoveTagDefinition.cs
parent7b17bd8ef7ee8b3391fea3bf7a9e1866be92e81b (diff)
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();
+}