Use this at your own risk!
This is a project to build an API for SurfTimer plugin and implement functionality to use it instead of MySQL connection.
Idea for this came about when I did some refactoring for SurfTimer-Mapchooser
to get it's data from an API instead of MySQL and the processing time drastically decreased, so why not try it for SurfTimer
itself?
There is still quite a bit of queries to be transferred from all *.sp
files in SurfTimer
source code to the main queries.sp
and to switch using them as variables instead of straight queries in Format(...);
.
Everyone is welcome to PR code if they want to help out. I cannot promise that this will be 100% usable at any point in time, but you can give it go using my SurfTimer
fork for it here
- Install dependancies
pip install -r requirements.txt
- Copy
config.json.example
toconfig.json
and populate - Create
requests.json
anddenied.json
files - Run it
uvicorn main:app --port <YOUR_PORT_HERE> --host 0.0.0.0 --reload
- Check it out at
https://<yourDomain>.com/docs
- ck_announcements
- ck_bonus
- ck_checkpoints
- ck_latestrecords
- ck_maptier
- ck_playeroptions2
- ck_playerrank
- ck_playertemp - Partially
- ck_playertimes
- ck_spawnlocations - ST Code
- ck_vipadmins
- ck_wrcps
- ck_zones - ST Code
- ck_prinfo - ST Code
- ck_replays - ST Code
- check tables data type
- ...?