The D-Tracker code itself is is a python script that is made info a function and imported into the routes file of flask. When the "getSummoner" API endpoint is triggered the dtrack function is also triggered. The name in the body of the request is passed to the dtrack function and the dtrack code begins. Firstly it gets some preliminary information on the account that it is querying like rank (no point checking accounts below diamond), game history, name, ID and so on. That information is used to query a match history API. Once all of the information is loaded in it takes the last few games and does a differential on the games creation date (in linux epoch time) calculates a differential on the dates and references that to the current date. Once that is done there are a few more calculations and from that we can determine the decay date. The result of the function is returned as a string and the result is outputted to the webpage.
- Requests to Riot Games API
- Query Sanitation
- Dataset filtering
- Game Data Calculations