cloud-py-api / nc_py_api

Nextcloud Python Framework
https://cloud-py-api.github.io/nc_py_api/
Other
84 stars 4 forks source link

added `files.get_tags` function #260

Closed bigcat88 closed 3 months ago

bigcat88 commented 3 months ago

Fixes #259


    nc = nc_py_api.Nextcloud(nc_auth_user="admin", nc_auth_pass="admin", nextcloud_url="http://stable29.local")
    some_file = nc.files.by_path("New folderz/1.txt")
    some_file_tags = nc.files.get_tags(some_file)
    print(some_file_tags)

Output:

[<SystemTag id=1, name=first>, <SystemTag id=2, name=second>]

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.75%. Comparing base (5d41bf9) to head (9f70fc2). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #260 +/- ## ========================================== + Coverage 95.72% 95.75% +0.03% ========================================== Files 45 46 +1 Lines 5261 5301 +40 ========================================== + Hits 5036 5076 +40 Misses 225 225 ``` | [Files](https://app.codecov.io/gh/cloud-py-api/nc_py_api/pull/260?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cloud-py-api) | Coverage Δ | | |---|---|---| | [nc\_py\_api/\_\_init\_\_.py](https://app.codecov.io/gh/cloud-py-api/nc_py_api/pull/260?src=pr&el=tree&filepath=nc_py_api%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cloud-py-api#diff-bmNfcHlfYXBpL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [nc\_py\_api/files/\_files.py](https://app.codecov.io/gh/cloud-py-api/nc_py_api/pull/260?src=pr&el=tree&filepath=nc_py_api%2Ffiles%2F_files.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cloud-py-api#diff-bmNfcHlfYXBpL2ZpbGVzL19maWxlcy5weQ==) | `98.59% <100.00%> (+0.06%)` | :arrow_up: | | [nc\_py\_api/files/files.py](https://app.codecov.io/gh/cloud-py-api/nc_py_api/pull/260?src=pr&el=tree&filepath=nc_py_api%2Ffiles%2Ffiles.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cloud-py-api#diff-bmNfcHlfYXBpL2ZpbGVzL2ZpbGVzLnB5) | `100.00% <100.00%> (ø)` | | | [nc\_py\_api/files/files\_async.py](https://app.codecov.io/gh/cloud-py-api/nc_py_api/pull/260?src=pr&el=tree&filepath=nc_py_api%2Ffiles%2Ffiles_async.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cloud-py-api#diff-bmNfcHlfYXBpL2ZpbGVzL2ZpbGVzX2FzeW5jLnB5) | `100.00% <100.00%> (ø)` | | | [nc\_py\_api/nextcloud.py](https://app.codecov.io/gh/cloud-py-api/nc_py_api/pull/260?src=pr&el=tree&filepath=nc_py_api%2Fnextcloud.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cloud-py-api#diff-bmNfcHlfYXBpL25leHRjbG91ZC5weQ==) | `98.00% <100.00%> (+<0.01%)` | :arrow_up: |