summaryrefslogtreecommitdiff
path: root/GetMedia.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2026-05-18 17:01:02 +1000
committerJake Mannens <jake@asger.xyz>2026-05-19 03:29:47 +1000
commit07cfbfdb92890188cc0bed120acb1fcbf72d34db (patch)
tree7beaf4ccf29d3060ef10e1c293a5ad6620535256 /GetMedia.cs
parentab46387d4d02e30b171a7c2fa07947b41ec691a0 (diff)
Added default global fallback session context
Diffstat (limited to 'GetMedia.cs')
-rw-r--r--GetMedia.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/GetMedia.cs b/GetMedia.cs
index b01f38e..e45ae3a 100644
--- a/GetMedia.cs
+++ b/GetMedia.cs
@@ -1,15 +1,11 @@
-using HyperBooru.ApiClient;
-using HyperBooru.ApiModels;
+using HyperBooru.ApiModels;
using System.Management.Automation;
namespace HyperBooru.PowerShell;
[Alias("ghbm")]
[Cmdlet(VerbsCommon.Get, "HyperBooruMedia")]
-public class GetMediaCmdlet : PSCmdlet {
- [Parameter(Mandatory = true)]
- public HBSession Session { get; set; }
-
+public class GetMediaCmdlet : SessionCmdlet {
[Parameter]
public SwitchParameter SelectIngest { get; set; }
[Parameter]
@@ -19,7 +15,7 @@ public class GetMediaCmdlet : PSCmdlet {
[Parameter]
public int Count { get; set; } = 50;
[Parameter]
- public ApiModels.SortOrder SortOrder { get; set; }
+ public SortOrder SortOrder { get; set; }
[Parameter(ParameterSetName = "All", Mandatory = true)]
public SwitchParameter All { get; set; }
[Parameter(ParameterSetName = "TagId", Mandatory = true)]