toomanypuppies-extension / fleaflicker-extender

0 stars 0 forks source link

Add expanded stats section #12

Open toomanypuppies-extension opened 2 years ago

toomanypuppies-extension commented 2 years ago

NHL API has stats available at this api: https://statsapi.web.nhl.com/api/v1/people/8474056/stats?stats=gameLog&season=20212022

This would be too expensive to pull for every player to calculate in the table view, but it could be used in the player detail view and just be called when needed for that. Fleaflicker points can be calculated by combining the results from this with the scoring rules api from fleaflicker https://www.fleaflicker.com/api/FetchLeagueRules?sport=NHL&league_id=12090 and doing some math.

This would let us look at things like points over last 10 games instead of last 10 days. It would also let us easily display a small table of stats from that period of games and what the player did to earn points in that timespan. Effectively, the fleaflicker player page could be rebuilt to show a lot more useful info than it currently does, and also show data much further back without clicking through the "go back another week" buttons multiple times.

toomanypuppies-extension commented 2 years ago

Could also potentially put this into a player comparison tool. Show expanded stats and points side by side?