thoughtspot / thoughtspot_rest_api_v1_python

Python implementations of ThoughtSpot REST APIs V1 and V2
Other
3 stars 6 forks source link

Displayname parameter fix #2

Closed OTFlorian closed 2 years ago

OTFlorian commented 2 years ago

The documentation of user and group mentions a displayname parameter. However, this library uses display_name instead of that (in the user__post and group__post methods). Because of this additional underscore, the parameter is not valid and post request results in an error (500). I have fixed this issue by removing the underscore from the parameter name.

bryanthowell-ts commented 2 years ago

Hi Florian - this is an intentional design decision (perhaps I can explain it better in the library documentation) to make the arguments of the methods in the library slightly more "Pythonic" and readable than the raw REST API arguments

OTFlorian commented 2 years ago

Hi @bryanthowell-ts , I did not change the python argument names. These are still with the underscore. I changed the strings of the names of the arguments used within the payload in the API request. I think it is alright to use the underscore to make the arguments in python more readable. However, when it generates a string to be used within the request, the argument name in the resulting string needs to match the name of the REST API argument.