diff options
Diffstat (limited to 'AddImplicitTag.cs')
| -rw-r--r-- | AddImplicitTag.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/AddImplicitTag.cs b/AddImplicitTag.cs new file mode 100644 index 0000000..50f6cfc --- /dev/null +++ b/AddImplicitTag.cs @@ -0,0 +1,17 @@ +using HyperBooru.ApiClient; +using System.Management.Automation; + +namespace HyperBooru.PowerShell; + +[Alias("ahbit")] +[Cmdlet(VerbsCommon.Add, "HyperBooruImplicitTag")] +public class AddImplicitTagCmdlet : PSCmdlet { + [Parameter(Mandatory = true)] public required HBSession Session { get; set; } + [Parameter(Mandatory = true)] public required Guid TagDefinitionId { get; set; } + [Parameter(Mandatory = true)] public required Guid[] ImplicitTagId { get; set; } + + protected override void ProcessRecord() => + Session.Tag.AddImplicitTagsAsync(TagDefinitionId, ImplicitTagId) + .GetAwaiter() + .GetResult(); +} |
