This commit is contained in:
2025-10-04 17:46:47 +08:00
parent b9e205356b
commit 14936b7384
6 changed files with 152 additions and 10 deletions

View File

@@ -116,10 +116,14 @@ type (
Messages []RecentChatMessageRespMessage `json:"messages"` // List of recent chat messages
}
RecentChatMessageRespMessage {
SteamID64 string `json:"steamID64"` // Player's SteamID64
UserName string `json:"userName"` // Player's username at the time of message
Message string `json:"message"` // Chat message content
TimeStamp int64 `json:"timeStamp"` // Message timestamp as Unix timestamp in milliseconds
SteamID64 string `json:"steamID64"` // Player's SteamID64
UserName string `json:"userName"` // Player's username at the time of message
Message string `json:"message"` // Chat message content
TimeStamp int64 `json:"timeStamp"` // Message timestamp as Unix timestamp in milliseconds
ServerName string `json:"serverName"` // Server name where the message was sent
MapName string `json:"mapName"` // Map name where the message was sent
ServerIP string `json:"serverIP"` // Server IP where the message was sent
ServerPort int `json:"serverPort"` // Server port where the message was sent
}
)
@@ -155,6 +159,21 @@ type (
}
)
type (
TopKillerReq {
TimeRangeStart int64 `json:"timeRangeStart"` // Unix timestamp in milliseconds
TimeRangeEnd int64 `json:"timeRangeEnd"` // Unix timestamp in milliseconds
}
TopKillerResp {
Players []TopKillerRespPlayer `json:"players"` // List of top players by kill count
}
TopKillerRespPlayer {
SteamID64 string `json:"steamID64"` // Player's SteamID64
UserName string `json:"userName"` // Player's username at the time of playing
KillCount int64 `json:"killCount"` // Kill count during the time range
}
)
@server (
prefix: /api/server/statistics
)
@@ -242,5 +261,12 @@ service ServerStatistics {
)
@handler topPlayTimeHandler
post /top-play-time (TopPlayTimeReq) returns (TopPlayTimeResp)
@doc (
summary: "Get top players by kill count within a specified time range"
description: "Get top players by kill count within a specified time range"
)
@handler topKillerHandler
post /top-killer (TopKillerReq) returns (TopKillerResp)
}