cc nasazeni

This commit is contained in:
JiriUhlir
2026-06-12 13:18:35 +02:00
parent bbec747bb7
commit 1801d02e5c
89 changed files with 3541 additions and 16 deletions
+18
View File
@@ -0,0 +1,18 @@
using IdokladSdk.Models.Account;
using Idoklad.Client;
namespace Idoklad.Services;
/// <summary>Account agenda: information about the current agenda and the current user.</summary>
public sealed class AccountService
{
private readonly IdokladApiAccessor _accessor;
public AccountService(IdokladApiAccessor accessor) => _accessor = accessor;
public async Task<AgendaGetModel> CurrentAgendaAsync(CancellationToken ct)
=> (await _accessor.Api.AccountClient.Agendas.Current().GetAsync(ct)).Unwrap();
public async Task<UserGetModel> CurrentUserAsync(CancellationToken ct)
=> (await _accessor.Api.AccountClient.Users.Current().GetAsync(ct)).Unwrap();
}