Allow extra keyword arguments to requests.get() in get() #159
Merged
WardBrian merged 1 commit intotoddrob99:developfrom Mar 27, 2025
WardBrian:extra-requests-params
Merged
Allow extra keyword arguments to requests.get() in get() #159WardBrian merged 1 commit intotoddrob99:developfrom WardBrian:extra-requests-params
WardBrian merged 1 commit intotoddrob99:developfrom
WardBrian:extra-requests-params
Conversation
Collaborator
Author
|
To test: import statsapi
# enable logging
from http.client import HTTPConnection
HTTPConnection.debuglevel = 1
import logging
logging.basicConfig(level=logging.DEBUG)
statsapi.get("schedule", {'sportId':1}, request_kwargs={"headers":{"Accept-Encoding": "gzip"}}) |
Merged
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #155