summaryrefslogtreecommitdiff
path: root/RemoveImplicitTag.cs
blob: 7d156ab689c2d1fceab702955fc0e6a3a28c9299 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using HyperBooru.ApiClient;
using System.Management.Automation;

namespace HyperBooru.PowerShell;

[Alias("rhbit")]
[Cmdlet(VerbsCommon.Remove, "HyperBooruImplicitTag")]
public class RemoveImplicitTagCmdlet : 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.DeleteImplicitTagAsync(TagDefinitionId, ImplicitTagId)
            .GetAwaiter()
            .GetResult();
}