TheLegendofPiratesOnline / documentation

TLOPO Documentation
https://tlopo.com/
Other
4 stars 1 forks source link

Expose player location data #12

Closed Esebranek closed 4 years ago

Esebranek commented 4 years ago

As a consumer of the TLOPO API I would like the ability to retrieve a population breakdown by location for any given shard.

Use case: A user is switching servers to sail on a less populated server. This information will help inform their decision and prevent switching to an ocean where the majority of the population is sailing.

Example:

GET <api>/shards/<shard_id>

{
  "locations": [
    {
      "location_id": 123,
      "location_name": "Tortuga",
      "population": 12
    }, ...
  ]
}

If you were willing to expose player information as well that could be included in this endpoint.

GET <api>/shards/<shard_id>

{
  "locations": [
    {
      "location_id": 123,
      "location_name": "Tortuga",
      "players": [
        {
          "player_id": 123,
          "player_name": "John",
          "guild_id": 456,
          "guild_name": "Some Guild",
          ...
        }, ...
      ]
    }, ...
  ]
}

Without knowing the underlying architecture I can't advocate for a specific format, but I would prefer to receive more information up front versus making numerous requests per resource.

loblao commented 4 years ago

Hi there, due to privacy concerns we will not be implementing this into our public API, but thank you for the suggestion.

Esebranek commented 4 years ago

I understand the concern with privacy when publishing player identifiers, but would it still be possible to implement a player count by location such as this first example.

GET <api>/shards/<shard_id>

{
  "locations": [
    {
      "location_id": 123,
      "location_name": "Tortuga",
      "population": 12
    }, ...
  ]
}

This doesn't expose any user information and would help users find their ideal server.