This application allows you to receive and save user StarCraft 2 game statistics using the public Battle Net API
Main advantages:
- Battle Net gives only the last 25 played matches. The application stores the entire history of matches from the moment the information from Battle Net began to be received
- The application calculates daily statistics (how many matches per day were won or lost in each of the modes)
- Visual display of results and MMR
- Win/Loss statistics by map with win rate calculation and visual display
- Possibility to send daily statistics to discord channel
|
|
You should get BATTLENET_CLIENTID, BATTLENET_CLIENTSECRET via this guide: https://develop.battle.net/documentation/guides/getting-started
Important
When you will create api client set up Redirect urls to the next values. It's important for the next steps
http://localhost:8084
http://localhost:8084/battlenet
Set up next environment variables
export BATTLENET_CLIENTID=YOUR_BATTLENET_CLIENTID
export BATTLENET_CLIENTSECRET=YOUR_BATTLENET_CLIENTSECRET
For get SC_PLAYERID you need use battlenet-oauth application from this repository:
chmod +x battlenet-oauth-2.5.0.jar
./battlenet-oauth-2.5.0.jar
In your browser open
http://localhost:8084
Click on battle.net icon and finish authorization. Clicks on buttons "Request Access Token" and "Request Player Info"
In the table you will see id row. Copy value and set up next environment variables
export SC_PLAYERID=YOUR_SC_PLAYERID
chmod +x sc2stats-backend-2.5.0.jar
./sc2stats-backend-2.5.0.jar &
chmod +x ./sc2stats-frontend-2.5.0.jar
./sc2stats-frontend-2.5.0.jar &
In your browser open
http://localhost
Enjoy it!
To send statistics to the discord channel, create a Discord Webhook and specify the following environment variables
DISCORD_ENABLED=true
DISCORD_WEBHOOK=YOUR_DISCORD_WEBHOOK_URL
Daily statistics are sent to the discord channel with the specified webhook once a day at midnight server time