HLTV
HLTV copied to clipboard
[WIP] Add `getEventStats`
Here is the draft PR of the getEventStats method in order to close #509.
It takes data from https://www.hltv.org/stats/players?event=EVENT_ID

- [X]
getEventStatsmethod added - [X] Optional flash, opening and pistol stats to reduce the amount of requests made to the API.
- [x] Parameters like
startDate,endDate, orside - [x] ⚠️ Use user config instead of default one
- [ ] Proper Types
- [ ] Tests
- [ ] Improve performance (maybe array splice ?)
It might be good to rename the method as getEventPlayersStats or else because other stats are also available for events.
Well I'm dumb, everything is almost already implemented in getPlayerStats method. What is only needed is to modify the existing method.
Cleaning up, please open a new pull request if you feel like finishing this feature.