Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [0.24.2 - 2026-03-02]

### Changed

- Use new `/ex-app/status` endpoint for `set_init_status` instead of deprecated `/apps/status/{appId}`

## [0.24.1 - 2026-02-25]

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion nc_py_api/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version of nc_py_api."""

__version__ = "0.24.1"
__version__ = "0.24.2.dev0"
4 changes: 2 additions & 2 deletions nc_py_api/nextcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def set_init_status(self, progress: int, error: str = "") -> None:
"""
self._session.ocs(
"PUT",
f"/ocs/v1.php/apps/app_api/apps/status/{self._session.cfg.app_name}",
"/ocs/v1.php/apps/app_api/ex-app/status",
json={
"progress": progress,
"error": error,
Expand Down Expand Up @@ -566,7 +566,7 @@ async def set_init_status(self, progress: int, error: str = "") -> None:
"""
await self._session.ocs(
"PUT",
f"/ocs/v1.php/apps/app_api/apps/status/{self._session.cfg.app_name}",
"/ocs/v1.php/apps/app_api/ex-app/status",
json={
"progress": progress,
"error": error,
Expand Down
8 changes: 4 additions & 4 deletions tests/actual_tests/files_sharing_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def test_create_expire_time(nc):
expire_time = expire_time.replace(hour=0, minute=0, second=0, microsecond=0)
new_share = nc.files.sharing.create("test_12345_text.txt", ShareType.TYPE_LINK, expire_date=expire_time)
nc.files.sharing.delete(new_share)
assert new_share.expire_date == expire_time
assert new_share.expire_date.date() == expire_time.date()
with pytest.raises(NextcloudException):
nc.files.sharing.create(
"test_12345_text.txt", ShareType.TYPE_LINK, expire_date=datetime.datetime.now() - datetime.timedelta(days=1)
Expand All @@ -221,7 +221,7 @@ async def test_create_expire_time_async(anc):
expire_time = expire_time.replace(hour=0, minute=0, second=0, microsecond=0)
new_share = await anc.files.sharing.create("test_12345_text.txt", ShareType.TYPE_LINK, expire_date=expire_time)
await anc.files.sharing.delete(new_share)
assert new_share.expire_date == expire_time
assert new_share.expire_date.date() == expire_time.date()
with pytest.raises(NextcloudException):
await anc.files.sharing.create(
"test_12345_text.txt", ShareType.TYPE_LINK, expire_date=datetime.datetime.now() - datetime.timedelta(days=1)
Expand Down Expand Up @@ -295,7 +295,7 @@ def test_create_update(nc):
expire_time = datetime.datetime.now() + datetime.timedelta(days=1)
expire_time = expire_time.replace(hour=0, minute=0, second=0, microsecond=0)
update_share = nc.files.sharing.update(new_share, expire_date=expire_time)
assert update_share.expire_date == expire_time
assert update_share.expire_date.date() == expire_time.date()
update_share = nc.files.sharing.update(new_share, note="note", label="label")
assert update_share.note == "note"
assert update_share.label == "label"
Expand Down Expand Up @@ -328,7 +328,7 @@ async def test_create_update_async(anc):
expire_time = datetime.datetime.now() + datetime.timedelta(days=1)
expire_time = expire_time.replace(hour=0, minute=0, second=0, microsecond=0)
update_share = await anc.files.sharing.update(new_share, expire_date=expire_time)
assert update_share.expire_date == expire_time
assert update_share.expire_date.date() == expire_time.date()
update_share = await anc.files.sharing.update(new_share, note="note", label="label")
assert update_share.note == "note"
assert update_share.label == "label"
Expand Down