Skip to content

Implement public API #30

@dehys

Description

@dehys

Description:

Implement a public API that runs on our server. Users can select an option to disable registering their server to the public Database but what the API does is listens to GET and POST and talks to a public database where all servers are stored with all their statistics for each player. The API can be accessed through a class in the lib to get data from the public storage. This means that if you want to use StatisticsLib and display a players statistics on example a website, you can use the public API to get statistics from a Minecraft server. Every server would have a API token assigned to them so developers can use the API and the token to get a specific server. The data of every server on the public storage will not be 100% public.

By implementing this feature we allow projects to use a public registry of minecraft servers using StatisticsLib to get statistics of players. Let's say there is a website called "minecraft-statistics.com", To register your minecraft server to the website you need to use the StatisticsLib plugin on your server as well as provide the API token generated for your server to the website. Then BAM, all player statistics of your server can be accessed on the website. The server administrator would be able to configure what statistics not to show publicly in the configuration of the plugin.

This will also create a new world for developers to create new wrappers/libs to talk to the public API(/Registry)

Example Usage:

StatisticsLib.getPublicRegistry().getServer("API-TOKEN").getUser();

Classes:

  • PublicRegistry
  • RegistryUser
  • RegistryServer

Metadata

Metadata

Assignees

Labels

1.3Version 1.3enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions