Upload files to "routes/API"
This commit is contained in:
17
routes/API/PlayerEvents.cs
Normal file
17
routes/API/PlayerEvents.cs
Normal file
@@ -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 = []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
32
routes/API/PlayerReporting.cs
Normal file
32
routes/API/PlayerReporting.cs
Normal file
@@ -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
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
29
routes/API/PlayerReputation.cs
Normal file
29
routes/API/PlayerReputation.cs
Normal file
@@ -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
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
routes/API/PlayerSubscriptions.cs
Normal file
11
routes/API/PlayerSubscriptions.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
namespace Stella.Routes.API
|
||||||
|
{
|
||||||
|
public class MySubscriptions
|
||||||
|
{
|
||||||
|
[ServerAPI.GET("/api/playersubscriptions/v1/my")]
|
||||||
|
public List<object> PlayerSubscriptions()
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
21
routes/API/Progression.cs
Normal file
21
routes/API/Progression.cs
Normal file
@@ -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
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user