echo — Echo Extension Classes and functions#

Classes and functions for working with the Echo extension.

class echo.Notification(site)[source]#

Bases: object

A notification issued by the Echo extension.

Changed in version 3.0.20190204: The id attribute was renamed to event_id, and its type changed from str to int.

Deprecated since version 3.0.20190204: The id attribute was retained temporarily for backward compatibility, but is deprecated and scheduled for removal.

Removed in version 7.0: The id attribute was removed.

Changed in version 10.3: The class is now defined using the @dataclass decorator to simplify internal initialization and improve maintainability.

Parameters:

site (BaseSite)

classmethod fromJSON(site, data)[source]#

Construct a Notification object from API JSON data.

Parameters:
  • site (BaseSite) – The pywikibot site object.

  • data (dict[str, Any]) – The JSON data dictionary representing a notification.

Returns:

An instance of Notification.

Return type:

Notification

mark_as_read()[source]#

Mark the notification as read.

Returns:

True if the notification was successfully marked as read, else False.

Return type:

bool

site: BaseSite#