en:code:system:notify
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | en:code:system:notify [2021/02/13 11:23] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Notify ====== | ||
+ | This object allows sending system notifications. It only works on GNU/Linux. | ||
+ | ===== Functions ===== | ||
+ | |||
+ | ==== Notify ==== | ||
+ | Constructor function. | ||
+ | |||
+ | === Syntax === | ||
+ | <code javascript> | ||
+ | var myObject = new Notify(); | ||
+ | </ | ||
+ | <code javascript> | ||
+ | var myObject = new Notify(parameters); | ||
+ | </ | ||
+ | |||
+ | === Arguments === | ||
+ | - parameters - (object) the message parameters | ||
+ | * title - (string) the notification' | ||
+ | * text - (string) the notification' | ||
+ | * icon - (string) the notification' | ||
+ | * timeout - (integer) the notification' | ||
+ | |||
+ | === Example === | ||
+ | <code javascript> | ||
+ | var myObject = new Notify(); | ||
+ | </ | ||
+ | <code javascript> | ||
+ | var myObject = new Notify({ | ||
+ | title: " | ||
+ | text: "Hello automation world!" | ||
+ | }); | ||
+ | </ | ||
+ | |||
+ | ===== Methods ===== | ||
+ | |||
+ | ==== show ==== | ||
+ | Shows the notification. | ||
+ | |||
+ | === Syntax === | ||
+ | <code javascript> | ||
+ | myObject.show(); | ||
+ | </ | ||
+ | <code javascript> | ||
+ | myObject.show(parameters); | ||
+ | </ | ||
+ | |||
+ | === Arguments === | ||
+ | - parameters - (object) the message parameters | ||
+ | * title - (string) the notification' | ||
+ | * text - (string) the notification' | ||
+ | * icon - (string) the notification' | ||
+ | * timeout - (integer) the notification' | ||
+ | |||
+ | === Returns === | ||
+ | * (Notify) this Notify | ||
+ | |||
+ | === Exceptions === | ||
+ | * (NotificationError) unable to show the notification | ||
+ | |||
+ | === Example === | ||
+ | <code javascript> | ||
+ | myObject.show(); | ||
+ | </ | ||
+ | <code javascript> | ||
+ | myObject.show({ | ||
+ | title: " | ||
+ | text: "Hello automation world!" | ||
+ | }); | ||
+ | </ | ||
+ | |||
+ | === Notes === | ||
+ | If you want to update a notification' |
en/code/system/notify.txt · Last modified: 2021/02/13 11:23 by 127.0.0.1