1 files changed, 7 insertions, 1 deletions
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<AlarmDto>())!;
}
- 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<Dictionary<string, AlarmDto>> GetAllAlarms() {
+ var res = await HttpClient.GetAsync("/alarms");
+ res.EnsureSuccessStatusCode();
+ return (await res.Content.ReadFromJsonAsync<Dictionary<string, AlarmDto>>())!;
+ }
}
|