djrscally / pubg_reporting

Tools to create and maintain a reporting db syncing to the pubg API
GNU General Public License v3.0
2 stars 1 forks source link

Adding Players by database #13

Open TTAbwill opened 4 years ago

TTAbwill commented 4 years ago

It would be great to add players by insert just the player data (or just the name) to table players.

Background: I would like to build a REST API for getting stats. But adding players won't work with config.json.

djrscally commented 4 years ago

Hey

We actually are doing that, and just updating the config.json from a separate "include these players" table before the sync. I kept that out of the code because I kinda wanted this to be useable by people even if they don't know SQL, so my current idea is to build a config option into the sync script such that running it lets you add player names and shards rather than doing the actual sync. So something like

python sync.py --configure

Would start an interactive CLI that lets you add or delete players.

What do you think?

TTAbwill commented 4 years ago

Hey there,

great work so far, thank you so much. For me it would be perfect if i could add a player in players table. But the CLI would be good for thoese don't know SQL, you are right.

bishnabob commented 4 years ago

Make it a config option then, to decide which one to use.

TTAbwill commented 4 years ago

That would be perfect, thank you!