Notifications
- class nc_py_api.notifications._NotificationsAPI(session: NcSessionBasic)[source]
Class providing an API for managing user notifications on the Nextcloud server.
- property available: bool
Returns True if the Nextcloud instance supports this feature, False otherwise.
- create(subject: str, message: str = '', subject_params: dict | None = None, message_params: dict | None = None, link: str = '') str [source]
Create a Notification for the current user and returns it’s ObjectID.
Note
Does not work in Nextcloud client mode, only for NextcloudApp mode.
- get_all() list[Notification] [source]
Gets all notifications for a current user.
- get_one(notification_id: int) Notification [source]
Gets a single notification for a current user.
- by_object_id(object_id: str) Notification | None [source]
Returns Notification if any by its object ID.
Note
this method is a temporary workaround until create can return notification_id.