EnterpriseyIntranet / nextcloud-API

NextCloud OCS API for Python
GNU General Public License v3.0
27 stars 27 forks source link

Refactoring #19

Closed danil-topchiy closed 5 years ago

danil-topchiy commented 5 years ago
danil-topchiy commented 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 ?

matejak commented 5 years ago

@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.

danil-topchiy commented 5 years ago

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.

scrutinizer-notifier commented 5 years ago

The inspection completed: 1 new issues, 82 updated code elements

matejak commented 5 years ago

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.