From d0fb00dccd1b5eeb83de15e670750d1102938bce Mon Sep 17 00:00:00 2001 From: Xhichn Date: Thu, 5 Oct 2023 10:39:00 +0800 Subject: [PATCH] Impl GetInfoAsync --- .../Takumi/Event/BbsSignReward/SignInClientOversea.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Takumi/Event/BbsSignReward/SignInClientOversea.cs b/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Takumi/Event/BbsSignReward/SignInClientOversea.cs index a0ff0f29..8918046f 100644 --- a/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Takumi/Event/BbsSignReward/SignInClientOversea.cs +++ b/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Takumi/Event/BbsSignReward/SignInClientOversea.cs @@ -24,9 +24,14 @@ internal sealed partial class SignInClientOversea : ISignInClient private readonly JsonSerializerOptions options; private readonly ILogger logger; - public ValueTask> GetInfoAsync(UserAndUid userAndUid, CancellationToken token = default(CancellationToken)) + public async ValueTask> GetInfoAsync(UserAndUid userAndUid, CancellationToken token = default(CancellationToken)) { - return ValueTask.FromException>(new NotSupportedException()); + Response? resp = await httpClient + .SetUser(userAndUid.User, CookieType.CookieToken) + .TryCatchGetFromJsonAsync>(ApiOsEndpoints.SignInRewardInfo(userAndUid.Uid), options, logger, token) + .ConfigureAwait(false); + + return Response.Response.DefaultIfNull(resp); } public async ValueTask> GetRewardAsync(Model.Entity.User user, CancellationToken token = default)