Closed matejak closed 5 years ago
As the implementation grows, following features gain shape:
add_to_group_res['ocs']['meta']['statuscode'] == 100
are used very often. All API results objects should allow something easier s.a. add_to_group_res.was_successful
to have bool value, and potentially add_to_group_res.error
to be either None/empty string, or an error string. There are also exceptions, it may be better to watch for an exception for being raised than checking every query about it's result. Let's brainstorm on this!NextCloud.py
file is too big. It is worth considering one file per API, and using imports to make them available using a single import.result['ocs']['data'][param_to_change]
, the result of nxc.get_ldap_config
can manifest either as a string, or as an integer, as it is noted in the discussion in #17.
- The
NextCloud.py
file is too big. It is worth considering one file per API, and using imports to make them available using a single import.
Merged in #19
- Constructs s.a. add_to_group_res['ocs']['meta']['statuscode'] == 100 are used very often. All API results objects should allow something easier s.a. add_to_group_res.was_successful to have bool value, and potentially add_to_group_res.error to be either None/empty string, or an error string. There are also exceptions, it may be better to watch for an exception for being raised than checking every query about it's result. Let's brainstorm on this!
Opened PR #26
As discussed in #19, renamed package from NextCloud to nextcloud in #27
Done for now. Until 1.0 is released, we can toy with the API as we please, but other modifications should be based on feedback from production.
In time of creating this issue, the API usage patterns are mediocre, and the implementation is somehow complex. The API of the REST API module can certainly be redesigned to make implementation easier.