Skip to content

schedule method must support season param.#149

Merged
WardBrian merged 1 commit intotoddrob99:developfrom
BrayanMnz:patch-2
Mar 26, 2025
Merged

schedule method must support season param.#149
WardBrian merged 1 commit intotoddrob99:developfrom
BrayanMnz:patch-2

Conversation

@BrayanMnz
Copy link
Contributor

The season param is supported by the schedule endpoint in mlb stats api, we must start supporting this since passing season will allow to retrieve a whole season schedule.

The season param is supported by the schedule endpoint in mlb stats api, we must start supporting this since passing season will allow to retrieve a whole season schedule.
@BrayanMnz
Copy link
Contributor Author

Hi @toddrob99 may you check this?

@WardBrian WardBrian changed the base branch from master to develop March 26, 2025 22:01
Copy link
Collaborator

@WardBrian WardBrian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed that this parameter interacts benignly with the start/endDate parameters -- if you pass a season which is outside the given dates, it just gets ignored.

Thanks

@WardBrian WardBrian merged commit e23c27f into toddrob99:develop Mar 26, 2025
@WardBrian WardBrian mentioned this pull request Apr 1, 2025
toddrob99 added a commit that referenced this pull request Apr 4, 2025
Features:

- New uniform endpoints `game_uniforms` and `team_uniforms` (#154)
- `schedule()` supports the `season` argument to get an entire season's games at once (#149)
- `player_stats()` and `player_stats_data()` support the `season` argument to get previous seasons of stats (#161)
- `get()` now accepts a `requests_kwargs` dict which are passed as extra arguments to `requests.get()` (#159)

Bug fixes:

- Fixed the offseason behavior of the `latest_season()` function to return the upcoming season, not just whatever the most recent in MLB's data is (#157)
- `schedule()` supports passing `include_series_status=False` to not request the series status from the endpoint, which can fail when requesting schedules covering large periods of time (#158)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants