Skip to content

Commit 4a9f778

Browse files
committed
removed unused ShareStatus
Signed-off-by: Alexander Piskun <[email protected]>
1 parent b71dc13 commit 4a9f778

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

docs/reference/Files/Shares.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ Refer to the **share examples** to see how to use them nicely.
1515

1616
.. autoclass:: nc_py_api.files.sharing.ShareType
1717
:members:
18-
19-
.. autoclass:: nc_py_api.files.sharing.ShareStatus
20-
:members:

nc_py_api/files/sharing.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,6 @@ class ShareType(enum.IntEnum):
4949
"""Share to the Reva instance(Science Mesh)"""
5050

5151

52-
class ShareStatus(enum.IntEnum):
53-
"""Status of the share."""
54-
55-
STATUS_PENDING = 0
56-
"""The share waits for acceptance"""
57-
STATUS_ACCEPTED = 1
58-
"""The share was for accepted"""
59-
STATUS_REJECTED = 2
60-
"""The share was for rejected"""
61-
62-
6352
class Share:
6453
"""Information about Share."""
6554

@@ -284,13 +273,13 @@ def get_pending(self) -> list[Share]:
284273
"""Returns all pending shares for current user."""
285274
return [Share(i) for i in self._session.ocs(method="GET", path=f"{self._ep_base}/shares/pending")]
286275

287-
def accept_share(self, share_id: typing.Union[int, Share]):
276+
def accept_share(self, share_id: typing.Union[int, Share]) -> None:
288277
"""Accept pending share."""
289278
_misc.require_capabilities("files_sharing", self._session.capabilities)
290279
share_id = share_id.share_id if isinstance(share_id, Share) else share_id
291280
self._session.ocs(method="POST", path=f"{self._ep_base}/pending/{share_id}")
292281

293-
def decline_share(self, share_id: typing.Union[int, Share]):
282+
def decline_share(self, share_id: typing.Union[int, Share]) -> None:
294283
"""Decline pending share."""
295284
_misc.require_capabilities("files_sharing", self._session.capabilities)
296285
share_id = share_id.share_id if isinstance(share_id, Share) else share_id

0 commit comments

Comments
 (0)