blob: ce9c7d98da2755de081c647997120343bb0d59b1 (
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("ghbuf")]
[Cmdlet(VerbsCommon.Get, "HyperBooruUploadedFile")]
public class GetUploadedFileCmdlet : PSCmdlet {
[Parameter(Position = 0, Mandatory = true)]
public HBSession Session { get; set; }
[Parameter(Position = 1, Mandatory = true)]
public Guid MediaId { get; set; }
protected override void ProcessRecord() =>
WriteObject(Session.Media.GetUploadedFilesAsync(MediaId).GetAwaiter().GetResult());
}
|