Skip to content

Commit 890721c

Browse files
committed
Simple Uptime Kuma implementation
1 parent d299752 commit 890721c

17 files changed

+106
-17
lines changed

RefreshDiscordBot.sln.DotSettings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/UserDictionary/Words/=kuma/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
22
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AColor_002Ecs_002Fl_003AC_0021_003FUsers_003Fjvyden_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9065439d7cce4ac3a3e562e9d937111ccb600_003F3c_003F30f54092_003FColor_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
3-
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEmbedBuilder_002Ecs_002Fl_003AC_0021_003FUsers_003Fjvyden_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9065439d7cce4ac3a3e562e9d937111ccb600_003F33_003F1dcdc3b2_003FEmbedBuilder_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>
3+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEmbedBuilder_002Ecs_002Fl_003AC_0021_003FUsers_003Fjvyden_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9065439d7cce4ac3a3e562e9d937111ccb600_003F33_003F1dcdc3b2_003FEmbedBuilder_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
4+
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AKumaAPIHub_002Ecs_002Fl_003AC_0021_003FUsers_003Fjvyden_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fca13ad69ce0d4dffbc70f63103811b462e00_003Fd7_003F070a78a0_003FKumaAPIHub_002Ecs/@EntryIndexedValue">ForceIncluded</s:String></wpf:ResourceDictionary>

RefreshDiscordBot/Api/RefreshApi.cs renamed to RefreshDiscordBot/Api/Refresh/RefreshApi.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
using System.Net.Http.Json;
2-
using System.Text.Json;
32
using NotEnoughLogs;
4-
using RefreshDiscordBot.Api.Types;
3+
using RefreshDiscordBot.Api.Refresh.Types;
54

6-
namespace RefreshDiscordBot.Api;
5+
namespace RefreshDiscordBot.Api.Refresh;
76

87
public class RefreshApi : IDisposable
98
{

RefreshDiscordBot/Api/RefreshApiResponse.cs renamed to RefreshDiscordBot/Api/Refresh/RefreshApiResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace RefreshDiscordBot.Api;
1+
namespace RefreshDiscordBot.Api.Refresh;
22

33
public class RefreshApiResponse<TType>
44
{

RefreshDiscordBot/Api/Types/RefreshRoom.cs renamed to RefreshDiscordBot/Api/Refresh/Types/RefreshRoom.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace RefreshDiscordBot.Api.Types;
1+
namespace RefreshDiscordBot.Api.Refresh.Types;
22

33
public class RefreshRoom
44
{

RefreshDiscordBot/Api/Types/RefreshRoomPlayerId.cs renamed to RefreshDiscordBot/Api/Refresh/Types/RefreshRoomPlayerId.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace RefreshDiscordBot.Api.Types;
1+
namespace RefreshDiscordBot.Api.Refresh.Types;
22

33
public class RefreshRoomPlayerId
44
{

RefreshDiscordBot/Api/Types/RefreshStatistics.cs renamed to RefreshDiscordBot/Api/Refresh/Types/RefreshStatistics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace RefreshDiscordBot.Api.Types;
1+
namespace RefreshDiscordBot.Api.Refresh.Types;
22

33
public class RefreshStatistics
44
{

RefreshDiscordBot/Api/Types/RefreshUser.cs renamed to RefreshDiscordBot/Api/Refresh/Types/RefreshUser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace RefreshDiscordBot.Api.Types;
1+
namespace RefreshDiscordBot.Api.Refresh.Types;
22

33
#nullable disable
44

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System.Text.Json.Serialization;
2+
3+
namespace RefreshDiscordBot.Api.UptimeKuma;
4+
5+
#nullable disable
6+
7+
public class HeartbeatList
8+
{
9+
[JsonPropertyName("status")]
10+
public StatusType Status { get; set; }
11+
12+
// [JsonPropertyName("time")]
13+
// public DateTimeOffset Time { get; set; }
14+
//
15+
// [JsonPropertyName("msg")]
16+
// public string Message { get; set; }
17+
//
18+
// [JsonPropertyName("ping")]
19+
// public float? Ping { get; set; }
20+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Text.Json.Serialization;
2+
3+
namespace RefreshDiscordBot.Api.UptimeKuma;
4+
5+
#nullable disable
6+
7+
public class StatusPageHeartbeat
8+
{
9+
[JsonPropertyName("heartbeatList")]
10+
public Dictionary<string, List<HeartbeatList>> HeartbeatList { get; set; }
11+
12+
[JsonPropertyName("uptimeList")]
13+
public Dictionary<string, double> UptimeList { get; set; }
14+
}

0 commit comments

Comments
 (0)