Closed danil-topchiy closed 5 years ago
@matejak I'm refactoring Requester.rtn
method to return custom Response class (as in #18). With json everything is clear, about xml - how do you think should we return it in some xml.ElementTree
or as a string ?
@danil-topc Regarding XML data, go for plaintext. There is no ambiguity how to handle JSON, but there are many XML parsers, so let's leave options open.
Thanks for review! I made requested changes.
Related to the previous remark, I suggest that the test code assumes that the PYTHONPATH points to the package, so we import nextcloud.base instead of src.nextcloud.base.
I inserted src/
to sys.path
in tests/__init__.py
.
Also did the same in example.py
And regarding custom Response class - will make it in another PR, cause this one looks big already.
The inspection completed: 1 new issues, 82 updated code elements
Good work, merging! I am thinking of renaming the module to a simple lowercase nextcloud
, but that can be done later, the PR is already quite huge.
src/
src/api_wrappers/
package with separate module for eachsrc/api_wrappers
package defines arrayAPI_CLASSES
with all classes for apiAPI_CLASSES
fromsrc/api_wrappers/
and takes all methods that are not private/protected