Skip to content

Commit

Permalink
Fix .api.ocs.get_file_shares(), fixes #30
Browse files Browse the repository at this point in the history
* Add parameters for shared_with_me and include_tags
* Bump version to 0.0.10
  • Loading branch information
aaronsegura committed Feb 18, 2025
1 parent 4b9fac2 commit e989795
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions nextcloud_async/api/ocs/shares.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ async def get_all_shares(self):
async def get_file_shares(
self,
path: str,
reshares: bool = False,
subfiles: bool = False):
reshares: Optional[bool] = False,
subfiles: Optional[bool] = False,
shared_with_me: Optional[bool] = False,
include_tags: Optional[bool] = False):
"""Return list of shares for given file/folder.
Args
Expand All @@ -79,6 +81,10 @@ async def get_file_shares(
subfiles (bool, optional): List recursively if `path` is a folder. Defaults to
False.
shared_with_me (bool, optional): Only get shares with the current user
include_tags (bool, optional): Include tags in the share
Returns
-------
list: File share descriptions
Expand All @@ -90,7 +96,9 @@ async def get_file_shares(
data={
'path': path,
'reshares': str(reshares).lower(),
'subfiles': str(subfiles).lower()})
'subfiles': str(subfiles).lower(),
'shared_with_me': str(shared_with_me).lower(),
'include_tags': str(include_tags).lower()})

async def get_share(self, share_id: int):
"""Return information about a known share.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "nextcloud_async"
version = "0.0.9"
version = "0.0.10"
authors = [
{ name="Aaron Segura" },
]
Expand Down

0 comments on commit e989795

Please sign in to comment.