-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endpoints without parameters throwing Exception #145
Comments
Can you provide a code snippet to replicate this? @waner11 |
@BrayanMnz I think this is referring to calling This is pedantic, but all endpoints do require at least one parameter (version)--the wrapper automatically adds it based on defaults in the endpoint definitions. The get function could still default to an empty dict. |
Got it @toddrob99 , I will take a look on how this is built in the wrapper. |
is anyone don't understand what this issue means, >>> import statsapi
>>> statsapi.get("teams")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: get() missing 1 required positional argument: 'params' In the case of the teams endpoint, we need to pass an empty dict, in order for it to work. >>> import statsapi
>>> statsapi.get("teams", {}) |
I apologize for late reply, but yes is what @toddrob99 explained, when calling the |
When attempting to call an endpoint without any parameters, such as 'teams' or 'awards', it throws an error. I've noticed in the code that it always expects parameters, even if the endpoint doesn't require any.
The text was updated successfully, but these errors were encountered: