- View summoner stats and matches
- Update summoner stats and matches
- SUMMONER-V4
- LEAGUE-V4
- MATCH-V5
- sqlite3
- Zainstaluj node (w projekcie używałem node v16.13.2 z npm 8.3.2)
mkdir projekt
cd projekt
git clone https://github.com/x3voo/OPJJ-wanna-be
- Wejdź na https://developer.riotgames.com/ i zaloguj się
- Kliknij "Regenerate API Key" i skopiuj "DEVELOPMENT API KEY"
- W
riotapi.js
zmieńvar api_key = "<DEVELOPMENT API KEY>";
- Uruchom server
node server.js
- Strona bedzię widoczna na adresie http://localhost
- Check if summoner exists in DB
- If not
- get data from API
- update DB
- return data from DB
- If does not get returned from API
- return "USER_DEOS_NOT_EXISTS"
- If exists
- Return data from DB
- Update summoner stats
- Get list of matchIds from API and update DB
- if there are no games, return "NO_MATCHES"
- Get details about matches from matches list and send it to DB
- Get summoner stats and matches from DB