diff options
| author | Jake Mannens <jake@asger.xyz> | 2026-05-25 23:45:46 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2026-05-28 03:12:55 +1000 |
| commit | 612a1572a7283ff5fe7126679fa384f65dcbd95c (patch) | |
| tree | 273501e58604525bbcdba1da4ba68c424364e4bf /HyperBooru.cs | |
| parent | 0ef438a7404117aad37e92b39ab8950c18522843 (diff) | |
Added statistics API functions
Diffstat (limited to 'HyperBooru.cs')
| -rw-r--r-- | HyperBooru.cs | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/HyperBooru.cs b/HyperBooru.cs index b07351d..99fd38a 100644 --- a/HyperBooru.cs +++ b/HyperBooru.cs @@ -5,11 +5,12 @@ using System.Net.Http.Json; namespace HyperBooru.ApiClient; public sealed class HBSession : IDisposable { - public Media Media { get; private init; } - public Tag Tag { get; private init; } - public Feed Feed { get; private init; } - public User User { get; private init; } - public Uri BaseUri { get; private init; } + public Media Media { get; private init; } + public Tag Tag { get; private init; } + public Feed Feed { get; private init; } + public User User { get; private init; } + public Statistics Statistics { get; private init; } + public Uri BaseUri { get; private init; } internal HttpClient HttpClient { get; private init; } @@ -35,10 +36,11 @@ public sealed class HBSession : IDisposable { BaseAddress = BaseUri }; - Media = new(this); - Tag = new(this); - Feed = new(this); - User = new(this); + Media = new(this); + Tag = new(this); + Feed = new(this); + User = new(this); + Statistics = new(this); } public async Task LoginAsync(string username, string password) { @@ -55,6 +57,12 @@ public sealed class HBSession : IDisposable { var content = await resp.Content.ReadAsStringAsync(); throw new Exception($"Unknown error while logging in: {content}"); } + + Media = new(this); + Tag = new(this); + Feed = new(this); + User = new(this); + Statistics = new(this); } public async Task LogoutAsync() => |
