toddrob99 / MLB-StatsAPI

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

boxscore_data function returns incorrect and incomplete batting notes. #131

Closed GersonSR closed 9 months ago

GersonSR commented 11 months ago

On the latest 1.7 version. boxscore_data is currently returning all battings notes under awayBattingNotes object, along with the notes being incomplete. Using the provide gamePk of 565997 from the docs, my awayBattingNotes object appears as:

"awayBattingNotes": { "0": "3-Ran for Heim in the 9th.", "1": "b-Singled for Peña in the 9th.", "2": "c-Walked for Maldonado, M in the 9th.", "3": "1-Ran for Singleton in the 9th." }

with an empty homeBattingNotes object.

Expected behavior is: "awayBattingNotes": { "0": "a-Popped out for Velasquez in the 6th." "1": "b-Singled for Peña in the 9th.", "2": "c-Walked for Maldonado, M in the 9th.", "3": "1-Ran for Singleton in the 9th." } Along with an non-empty and accurate homeBattingNotes.

My current call looks like this: return statsapi.boxscore_data(game_id)

toddrob99 commented 11 months ago

Thanks for reporting this. It looks like the issue was introduced when the method was refactored back in 2020.

toddrob99 commented 9 months ago

Fixed in v1.7.1