toddrob99 / MLB-StatsAPI

Python wrapper for MLB Stats API
GNU General Public License v3.0
513 stars 98 forks source link

Incorrect seasons endpoint documentation #128

Closed ntbanks closed 9 months ago

ntbanks commented 9 months ago

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:

While the docs make it seem like you would call it like this... or something...?, which gives an error:

So... there is a missing / after seasons, and the wording around all being a boolean is very confusing.

Mostly posting this to help confused people not to get the docs fixed.

Cheers!

toddrob99 commented 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.

ntbanks commented 6 months ago

Ohhhh! Duh ok that makes sense, I missed that. Thanks for the explanation and updating the wiki