Skip to content

Commit

Permalink
Merge pull request #264 from cwendt94/UpdateFootballStats
Browse files Browse the repository at this point in the history
Football Update Stats
  • Loading branch information
cwendt94 authored Oct 15, 2021
2 parents 3ce540c + 19a2481 commit 900739a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions espn_api/football/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
19: "passing2PtConversions",
20: "passingInterceptions",

23: "rushingAttempts",
24: "rushingYards",
25: "rushingTouchdowns",
26: "rushing2PtConversions",
Expand All @@ -106,6 +107,7 @@
43: "receivingTouchdowns",
44: "receiving2PtConversions",
53: "receivingReceptions",
58: "receivingTargets",

72: "lostFumbles",

Expand Down
2 changes: 1 addition & 1 deletion espn_api/football/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, data, year):
for stats in player_stats:
if stats.get('seasonId') != year:
continue
stats_breakdown = stats.get('appliedStats') if stats.get('appliedStats') else stats.get('stats', {})
stats_breakdown = stats.get('stats') if stats.get('stats') else stats.get('appliedStats', {})
breakdown = {PLAYER_STATS_MAP.get(int(k), k):v for (k,v) in stats_breakdown.items()}
points = round(stats.get('appliedTotal', 0), 2)
scoring_period = stats.get('scoringPeriodId')
Expand Down

0 comments on commit 900739a

Please sign in to comment.