MLB-StatsAPI icon indicating copy to clipboard operation
MLB-StatsAPI copied to clipboard

Add query param

Open raaraa opened this issue 1 year ago • 2 comments

Could we add season as a query param to the schedules endpoint. Seems we would only have to add it to endpoints.py and the wiki. Happy to take this on if approved.

raaraa avatar Oct 18 '24 00:10 raaraa

Interesting... I didn't realize the schedule endpoint supported season as a parameter. It looks like it basically pre-fills start and end date parameters for you. I have a couple other things that I've been putting off, so I'll add this when I get around to those. In the meantime you can still use the season parameter by passing force=True to statsapi.get(), e.g. statsapi.get("season", {"sportId": 1, "season": 2023}, force=True)

toddrob99 avatar Oct 18 '24 01:10 toddrob99

awesome, thanks!

raaraa avatar Oct 18 '24 01:10 raaraa