toddrob99 / MLB-StatsAPI

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

Additional Data? #90

Closed jouellnyc closed 2 years ago

jouellnyc commented 2 years ago

Howdy. Great Library. I've taken a look here and can collect data for current balls/strikes/outs just fine (thanks for that) but cannot see data for example for the final decision of the at bat (i.e 'walk' , 'hit to left', 'home run' / etc ). Is that possible?

Or how if runners are on base, which bases. Would that be possible?

I am happy to help but am not yet familiar w/the upstream components.

toddrob99 commented 2 years ago

That data is in the game endpoint. Each item in the list at liveData > plays > allPlays has a result dict that contains the outcome of the play, a runners list that shows all runner movement, and a playEvents list that contains all events in the play.

jouellnyc commented 2 years ago

Ah. I misunderstood. I thought I had poked this enough. Sorry 'bout that. And thank you for the pointer.