ProjectLighthouse icon indicating copy to clipboard operation
ProjectLighthouse copied to clipboard

Implement player count per platform and player list API endpoints

Open Slendy opened this issue 1 year ago • 1 comments

This PR adds new endpoints to the v1 API to support fetching player counts grouped by platform as well as fetching the entire list of online users.

Example /api/v1/players response:

{
  "players": [
    {
      "username": "Slendy",
      "game": "LittleBigPlanet2",
      "platform": "RPCS3"
    }
  ]
}

Example /api/v1/playerCount/platform response:

{
  "platforms": [
    {
      "platform": "PS3",
      "playerCount": 0
    },
    {
      "platform": "RPCS3",
      "playerCount": 1
    },
    {
      "platform": "Vita",
      "playerCount": 0
    },
    {
      "platform": "PSP",
      "playerCount": 0
    }
  ],
  "totalPlayerCount": 1
}

Slendy avatar Apr 23 '24 00:04 Slendy

LGTM

W0lf4llo avatar Apr 30 '24 13:04 W0lf4llo