Closed Laneville closed 2 years ago
I have submitted an application to statsapi MLB for their documentation so hopefully I can troubleshoot this error and help out, instead of just posting :)
I have submitted an application to statsapi MLB for their documentation so hopefully I can troubleshoot this error and help out, instead of just posting :)
You won't get access to the MLB documentation unless you're an affiliate.
I think there are two issues here...
stats
parameters was not indicated as required in the documentation when I generated this package's endpoint structure, but it does in fact appear to be required. If you include stats=season
the endpoint works. Try https://statsapi.mlb.com/api/v1/teams/143/stats?season=2022&group=hitting&stats=season or statsapi.get("team_stats", {"teamId": 143, "season" : 2022, "group": "hitting", "stats": "season"})
yes, looks like I got that response from MLB :(
And yes looks like that fixed the issue. Thank you!
Getting an HTTPError: 404 Client Error: Not found for url: https://statsapi.mlb.com/api/v1/teams/159/stats?season=2022&group=hitting
Can someone confirm if they are experiencing the same issue with this 'team_stats' endpoint?