Notifications
Notifications: the email alerts NoClick sends your account's owner, one switch for each kind.
class NotificationsWhich kinds of email alert NoClick sends your account's owner: categories maps each kind
(run_failure, credits, spend_cap, digest, ...) to whether it's on. A kind never
turned off is on. They're what Settings → Notifications in the NoClick app shows, and every alert
email carries a one-click link that turns its own kind off.
| categories | dict[str, bool] | |
| raw | dict[str, Any] | The response JSON exactly as the API sent it. |
getclassmethodasync
noclick.Notifications.get(*, client=None) -> NotificationsRead which kinds of email alert your account's owner gets. Any of your account's own keys may,
but one held to one of your users, which raises noclick.PermissionDenied: they're the owner's.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Every kind NoClick sends, each True (on) or False (off).
alerts = noclick.Notifications.get()
print(alerts.categories["digest"]) # True until it's turned off
off = [kind for kind, on in alerts.categories.items() if not on]updateclassmethodasync
noclick.Notifications.update(categories, *, client=None) -> NotificationsTurn kinds of email alert to your account's owner on (True) or off (False), in one
change; a kind you leave out stays as it is. A kind NoClick doesn't send, or a value that isn't
True or False, raises noclick.InvalidRequest and changes nothing.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
None)Every kind, as it stands after the change.
noclick.Notifications.update({"digest": False, "run_failure": True})