Closed ntbanks closed 9 months ago
I can see how this is confusing. The way the endpoint documentation is written in the wiki is how this api wrapper builds the URLs. For the seasons
endpoint, it has a "path parameter" named all
, which is a boolean that will add /all
to the path if passed with a value of True
. You can see the logic in endpoints.py.
I have updated the wiki to be a bit more clear around the usage of this endpoint.
Ohhhh! Duh ok that makes sense, I missed that. Thanks for the explanation and updating the wiki
Love this wiki and this package, awesome work on this!. I prefer to make HTTP calls directly and got stuck for a while because of the incorrect documentation for the
seasons
end point. Here is how to correctly call the seasons end point:http://statsapi.mlb.com/api/v1/seasons/all?sportId=1
While the docs make it seem like you would call it like this... or something...?, which gives an error:
http://statsapi.mlb.com/api/v1/seasons/True?sportId=1
So... there is a missing
/
afterseasons
, and the wording aroundall
being a boolean is very confusing.Mostly posting this to help confused people not to get the docs fixed.
Cheers!