RoseAPI free ⭐Player APIs (/api) icon

RoseAPI free ⭐Player APIs (/api) -----

Build your own api system like large servers do using PlaceholderAPI and RoseAPI!



[​IMG]

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.

Code (Text):
import requests

API_KEY = "5261253c-747b-4853-a6d4-bcde473b49b7"
PLAYER_UUID = "226d5055-3e41-44f4-a527-ecbce4a6bb28"

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!
  1. Version
    Please do not change the value, it's used to upgrade the database between releases and must remain as it is.
  2. 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
  3. 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
  4. 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
  5. mysql
    This section in the configuration is for configuring your mysql database details. This section is ignored if you are using SQLite.
  6. 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
Default Configuration:
Code (YAML):
version : 1
storage_type
: sqlite
server_port
: 8080
show_after
: false

mysql
:
  username
: 'root'
  password
: 'password'
  host
: 'yourdomain.com:3306'
  database
: 'roseapi'

placeholders
:
 - "vault_eco_balance"
  - "player_username"
Resource Information
Author:
----------
Total Downloads: 86
First Release: Apr 20, 2022
Last Update: Jul 31, 2022
Category: ---------------
All-Time Rating:
1 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings