Closed andystanley closed 4 years ago
Thanks for the suggestion @andystanley we're always looking for ways to better align with the idioms of each language we support.
I'm not a Python expert, but we have a few on our team. @trex and @matthew-altman any opinion here?
A PR would be great. This library is built using a template builder.
Currently the optional parameters are only designated in the comment, we may have to come up with another attribute in our API DSL to denote an optional parameter so the client template can optionally take advantage.
Here are the templates and moving parts if you want to take a look.
https://github.com/FusionAuth/fusionauth-client-builder https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/client/python.client.ftl https://github.com/FusionAuth/fusionauth-client-builder/blob/master/src/main/api/exchangeUserCredentialsForAccessToken.json
Cool! I wasn't aware this library was built with a template builder, but I'll take a look and see if it's something I could put a PR up for.
I've taken a stab at this and opened a PR for this change in the https://github.com/FusionAuth/fusionauth-client-builder repo.
Great, thanks for the PR @andystanley we'll take a look.
Related PR was accepted.
Thanks for all your work on this library!
Small suggestion, but I believe making use of Python's optional parameters would greatly improve the usability of this library.
For example, the
exchange_user_credentials_for_access_token
method has 4 optional parameters, but they still need to be specified.If I just wanted to specify the
scope
it would look like:However, I would prefer to do:
This can be accomplished by changing the method signature to specify
None
for the optional parameters:Let me know what you think. I can definitely put a PR up for this change!