IF THIS IS UPLOADED BY SOMEONE OTHER THAN "SuperSoda" IT IS MALWARE.
RoseAPI is a plugin that allows you to create your own API system like many popular servers do. The plugin depends on
PlaceholderAPI as this is what we use to deliver values on the webserver.
I strongly recommend using an nginx reverse proxy until spark, the webserver this project depends on has not been updated in a while and doesn't have built in TLS/SSL
To use the plugin, you can drag and drop it into the plugins folder. Configure the webserver port (or leave it as default) and then restart the server. You can access the api using this example code for Python.
x = requests.get("http://server.ip:8080/" + PLAYER_UUID + "/player_first_join_date", headers={"token":API_KEY})
print(x.text)
The PLAYER_UUID is the UUID of the player who's information you'd like to retrieve. The API_KEY is what is generated upon doing /api or /api new.
Please leave a positive review if the plugin helps since I'm relatively new to SQLite, MySQL and running async tasks! If you find an error or want to contact me about something, message me on discord at fizz#4096.
Configuration This section will provide information on how to configure the plugin!
Version Please do not change the value, it's used to upgrade the database between releases and must remain as it is.
storage_type This is where you will be able to chose between using mysql or sqlite. SQLite is completely local and the default setting, meaning that you will not have to do any additional setup
server_port This is the port of the webserver that the plugin will be hosting. By default it is 8080, make sure the port is open! In future releases you will be able to disable the webserver
show_after This is for the /api command and if true, will let the player view their API key by running /api any time. But if the value is false it will only show the API key once on doing /api
mysql This section in the configuration is for configuring your mysql database details. This section is ignored if you are using SQLite.
placeholders This section is where you can chose what placeholders players will have access to using. By default it has player_username and vault_eco_balance