toddrob99 / MLB-StatsAPI

Python wrapper for MLB Stats API
GNU General Public License v3.0
513 stars 98 forks source link

Past 7 Day stats for player id #116

Closed rpoynter1342 closed 1 year ago

rpoynter1342 commented 1 year ago

Currently, I'm having to get the schedule for the past 7 days, get the players team id then loop through each game for each date and if the players team played, then we just assume he played. Is there a way to just get a players past 7 games stats in a format of something like

game1: {hits: 3, obp: .529...} game2: {hits: 0, obp: .222...} game3: {hits: 1, obp: .311..} ... and so on?

toddrob99 commented 1 year ago

https://www.reddit.com/r/mlbdata/comments/13xrft7/past_7_day_stats_for_player_id/