Implement player count per platform and player list API endpoints (#1014)
Some checks failed
Continuous Integration / Build & Test (map[database:true fullName:ubuntu-latest prettyName:Linux webTest:true]) (push) Has been cancelled
Upload Translations to Crowdin / crowdin-sync (push) Has been cancelled
Build Docker Image / Build and Publish (push) Has been cancelled

* Implement player count per platform and player list API endpoints

* Fix inconsistencies in the XML documentation

* Update PlayerListResponse.cs
This commit is contained in:
Josh 2024-08-28 20:17:03 -05:00 committed by GitHub
commit 0af064ad1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 113 additions and 10 deletions

View file

@ -27,7 +27,8 @@ public class StatisticsController : ControllerBase
public IActionResult PlayersInPodCount() => this.Ok(StatisticsHelper.RoomCountForPlatform(this.GetToken().Platform).ToString());
[HttpGet("totalPlayerCount")]
public async Task<IActionResult> TotalPlayerCount() => this.Ok((await StatisticsHelper.RecentMatchesForGame(this.database, this.GetToken().GameVersion)).ToString());
public async Task<IActionResult> TotalPlayerCount() =>
this.Ok((await StatisticsHelper.RecentMatches(this.database, l => l.GameVersion == this.GetToken().GameVersion)).ToString());
[HttpGet("planetStats")]
[Produces("text/xml")]