zero-sum-seattle / python-mlb-statsapi

Python Wrapper for the MLB's Official Stats API
MIT License
48 stars 11 forks source link

Apiupdatefixes #196

Closed KCNilssen closed 1 year ago

KCNilssen commented 1 year ago

Why

Fixes Issue #194 and Issue #195

What

Standings model attribute Teamrecords was updated to include

eliminationnumbersport: str
eliminationnumberleague: str
eliminationnumberdivision: str
eliminationnumberconference: str

Which were missing due to an update with the mlb api. Mock_json test json file was also updated to reflect these updates.

Game model livedata/boxscore attribute PlayersDictPerson was updated to make position optional

position: Optional[Union[Position, dict]] = None

|

self.position = Position(**self.position) if self.position else self.position

This was made optional due to a Tyler Brown playing for Minnesota in gameid 719391 not having a position attribute.

Tests

Live + mocktests updated and ran. Both pass 100%

Risk and impact

Normal risk, normal impact.