User Status
- class nc_py_api.user_status._UserStatusAPI(session: NcSessionBasic)[source]
Class providing the user status management API on the Nextcloud server.
- property available: bool
Returns True if the Nextcloud instance supports this feature, False otherwise.
- get_list(limit: int | None = None, offset: int | None = None) list[UserStatus] [source]
Returns statuses for all users.
- get_current() CurrentUserStatus [source]
Returns the current user status.
- get(user_id: str) UserStatus | None [source]
Returns the user status for the specified user.
- get_predefined() list[PredefinedStatus] [source]
Returns a list of predefined statuses available for installation on this Nextcloud instance.
- set_predefined(status_id: str, clear_at: int = 0) None [source]
Set predefined status for the current user.
- Parameters:
status_id –
predefined
status ID.clear_at – optional time in seconds before the status is cleared.
- set_status_type(value: Literal['online', 'away', 'dnd', 'invisible', 'offline']) None [source]
Sets the status type for the current user.
- set_status(message: str | None = None, clear_at: int = 0, status_icon: str = '') None [source]
Sets current user status.
- Parameters:
message – Message text to set in the status.
clear_at – Unix Timestamp, representing the time to clear the status.
status_icon – The icon picked by the user (must be one emoji)
- get_backup_status(user_id: str = '') UserStatus | None [source]
Get the backup status of the user if any.
- restore_backup_status(status_id: str) CurrentUserStatus | None [source]
Restores the backup state as current for the current user.
- class nc_py_api.user_status.CurrentUserStatus(raw_data: dict)[source]
Information about current user status.
- property status_type_defined: bool
True if
UserStatus.status_type
is set by user, False otherwise.