From 7f973487568518ba3d4970b40a811069e5e81afe Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 24 Jul 2026 15:43:25 +0000 Subject: [PATCH] Upload files to "routes/API" --- routes/API/PlayerEvents.cs | 17 ++++++++++++++++ routes/API/PlayerReporting.cs | 32 +++++++++++++++++++++++++++++++ routes/API/PlayerReputation.cs | 29 ++++++++++++++++++++++++++++ routes/API/PlayerSubscriptions.cs | 11 +++++++++++ routes/API/Progression.cs | 21 ++++++++++++++++++++ 5 files changed, 110 insertions(+) create mode 100644 routes/API/PlayerEvents.cs create mode 100644 routes/API/PlayerReporting.cs create mode 100644 routes/API/PlayerReputation.cs create mode 100644 routes/API/PlayerSubscriptions.cs create mode 100644 routes/API/Progression.cs diff --git a/routes/API/PlayerEvents.cs b/routes/API/PlayerEvents.cs new file mode 100644 index 0000000..3c71f4f --- /dev/null +++ b/routes/API/PlayerEvents.cs @@ -0,0 +1,17 @@ +using Stella.Models; + +namespace Stella.Routes.API +{ + public class GetPlayerEvents + { + [ServerAPI.GET("/api/playerevents/v1/all")] + public LocalPlayerEventInfo ReturnGetPlayerEvents() + { + return new LocalPlayerEventInfo + { + Created = [], + Responses = [] + }; + } + } +} \ No newline at end of file diff --git a/routes/API/PlayerReporting.cs b/routes/API/PlayerReporting.cs new file mode 100644 index 0000000..14615c3 --- /dev/null +++ b/routes/API/PlayerReporting.cs @@ -0,0 +1,32 @@ +using Stella.Models; +using System.Text.Json; + +namespace Stella.Routes.API +{ + public class PlayerReporting + { + [ServerAPI.POST("/api/PlayerReporting/v1/hile")] + [ServerAPI.UseAuthorization] + public dynamic ModerationBlockDetails(HttpContext ctx) + { + Console.WriteLine(JsonSerializer.Serialize(ctx.Request.Form.ToDictionary(x => x.Key, x => x.Value.ToString()))); + return Results.Ok(); + } + + [ServerAPI.GET("/api/PlayerReporting/v1/moderationBlockDetails")] + [ServerAPI.UseAuthorization] + public dynamic ReturnModerationBlockDetails() + { + return new ModerationBlockDetailDTO + { + ReportCategory = ReportCategory.Unknown, + Duration = 0, + GameSessionId = 0, + IsHostKick = false, + Message = "", + PlayerIdReporter = null, + IsBan = false + }; + } + } +} \ No newline at end of file diff --git a/routes/API/PlayerReputation.cs b/routes/API/PlayerReputation.cs new file mode 100644 index 0000000..5db9334 --- /dev/null +++ b/routes/API/PlayerReputation.cs @@ -0,0 +1,29 @@ +using MongoDB.Driver; +using Stella.Models; + +namespace Stella.Routes.API +{ + public class GetPlayerReputation + { + [ServerAPI.GET("/api/playerReputation/v1/{accountId}")] + public ReputationDTO ReturnGetPlayerReputation(int accountId) + { + MongoDB.User user = MongoDB.usersCollection.Find(u => u.AccountId == accountId).FirstOrDefault(); + + return new ReputationDTO + { + AccountId = accountId, + Noteriety = 0, + CheerGeneral = 0, + CheerHelpful = 1, + CheerGreatHost = 1, + CheerSportsman = 1, + CheerCreative = 1, + CheerCredit = 0, + SubscriberCount = 0, + SubscribedCount = 0, + SelectedCheer = CheerCategory.General + }; + } + } +} \ No newline at end of file diff --git a/routes/API/PlayerSubscriptions.cs b/routes/API/PlayerSubscriptions.cs new file mode 100644 index 0000000..f03a658 --- /dev/null +++ b/routes/API/PlayerSubscriptions.cs @@ -0,0 +1,11 @@ +namespace Stella.Routes.API +{ + public class MySubscriptions + { + [ServerAPI.GET("/api/playersubscriptions/v1/my")] + public List PlayerSubscriptions() + { + return []; + } + } +} diff --git a/routes/API/Progression.cs b/routes/API/Progression.cs new file mode 100644 index 0000000..94a6096 --- /dev/null +++ b/routes/API/Progression.cs @@ -0,0 +1,21 @@ +using MongoDB.Driver; +using Stella.Models; + +namespace Stella.Routes.API +{ + public class GetProgression + { + [ServerAPI.GET("/api/players/v1/progression/{accountId}")] + public ProgressionDTO Progression(int accountId) + { + MongoDB.User user = MongoDB.usersCollection.Find(u => u.AccountId == accountId).FirstOrDefault(); + + return new ProgressionDTO + { + AccountId = accountId, + Level = 1, + XP = 0 + }; + } + } +} \ No newline at end of file