Expand the Python API parameters with an optional return fields parameter
complete
Rok Kogovšek
Currently most of the exposed python calls return the whole instance of an object with all the data included, e.g. get get_reviews_by_project_id, while one can specify the return fields via the "fields" key inside the _get_json_response call getData dictionary.
Already speed-wise it makes sense to reduce the DB requests to fetch only what is needed, so an optional parameter to define return fields is a reasonable request. You can just pass on the list to the underlying getData parameter, maybe enforce that the ID is always present and ignore non-existing keys. That would be perfect to have already built-in instead of us using the protected/hidden _get_json_response call directly.
Seems like a simple fix, which would also reduce console spamming when doing command line maintenance besides optimising script requests.
Philip Floetotto
complete
This is now live! Thanks for all the help! https://github.com/syncsketch/python-api/releases
Philip Floetotto
in progress
Pull request is in QA and should be released shortly.
Philip Floetotto
planned
Matija Tomažič
A PR for this specific issue on your GitHub.
Philip Floetotto
Matija Tomažič: Sweet - that is amazing. Thank you! I'll forward this to our backend team and we'll try to get that in there asap.
Philip Floetotto
under review