From 197f7d362be4a947b1951ed560223527f8c16449 Mon Sep 17 00:00:00 2001 From: Rory& Date: Mon, 2 Jun 2025 19:38:34 +0200 Subject: More alarm testing --- testFrontend/SafeNSound.Sdk/SafeNSoundClient.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'testFrontend/SafeNSound.Sdk/SafeNSoundClient.cs') diff --git a/testFrontend/SafeNSound.Sdk/SafeNSoundClient.cs b/testFrontend/SafeNSound.Sdk/SafeNSoundClient.cs index 444e313..c6f16f2 100644 --- a/testFrontend/SafeNSound.Sdk/SafeNSoundClient.cs +++ b/testFrontend/SafeNSound.Sdk/SafeNSoundClient.cs @@ -29,7 +29,7 @@ public class SafeNSoundClient(SafeNSoundConfiguration config, string accessToken return (await res.Content.ReadFromJsonAsync())!; } - public async Task SetAlarm(AlarmDto alarm) { + public async Task SetAlarm(AlarmDto alarm, string userId = "@me") { var res = await HttpClient.PutAsJsonAsync("/alarm/@me", alarm); res.EnsureSuccessStatusCode(); } @@ -48,6 +48,12 @@ public class SafeNSoundClient(SafeNSoundConfiguration config, string accessToken #endregion + + public async Task> GetAllAlarms() { + var res = await HttpClient.GetAsync("/alarms"); + res.EnsureSuccessStatusCode(); + return (await res.Content.ReadFromJsonAsync>())!; + } } -- cgit 1.5.1