@@ -16,7 +16,7 @@ When a resource changes, user-defined callbacks are dispatched in the 4D worker
1616
1717### API
1818
19- #### ` Office365.mail.notification (param{; folderId}) → notificationObj `
19+ #### ` Office365.mail.notifier (param{; folderId}) → notificationObj `
2020
2121Creates a notification object for ** mail** change notifications.
2222
@@ -25,7 +25,7 @@ Creates a notification object for **mail** change notifications.
2525| ` param ` | Object | Callback and mode definitions (see below) |
2626| ` folderId ` | Text | * (optional)* Subscribe only to changes in that mail folder. If omitted, subscribe to all folders. |
2727
28- #### ` Office365.calendar.notification (param{; calendarId}) → notificationObj `
28+ #### ` Office365.calendar.notifier (param{; calendarId}) → notificationObj `
2929
3030Creates a notification object for ** calendar event** change notifications.
3131
@@ -87,15 +87,15 @@ Creates a notification object for **calendar event** change notifications.
8787
8888``` 4d
8989// Push mode — Mail notifications via webhook
90- $notif:=$office365.mail.notification ({ \
90+ $notif:=$office365.mail.notifier ({ \
9191 endPoint: "https://myserver.com"; \
9292 onCreate: Formula(ALERT("New mail: "+String($1.IDs))); \
9393 onDelete: Formula(ALERT("Mail deleted: "+String($1.IDs))) \
9494})
9595$status:=$notif.start()
9696
9797// Pull mode — Calendar notifications via delta polling (every 60 seconds)
98- $calNotif:=$office365.calendar.notification ({ \
98+ $calNotif:=$office365.calendar.notifier ({ \
9999 timer: 60; \
100100 onCreate: Formula(handleNewEvent($1)); \
101101 onModify: Formula(handleEventUpdate($1)) \
@@ -112,15 +112,15 @@ $status:=$notif.stop()
112112
113113### API
114114
115- #### ` Google.mail.notification (param) → notificationObj `
115+ #### ` Google.mail.notifier (param) → notificationObj `
116116
117117Creates a notification object for ** Gmail** change notifications.
118118
119119| Parameter | Type | Description |
120120| ---| ---| ---|
121121| ` param ` | Object | Callback and mode definitions (see below) |
122122
123- #### ` Google.calendar.notification (param{; calendarId}) → notificationObj `
123+ #### ` Google.calendar.notifier (param{; calendarId}) → notificationObj `
124124
125125Creates a notification object for ** Google Calendar** event change notifications.
126126
@@ -207,23 +207,23 @@ For Calendar push notifications, pass the `endPoint` parameter. The webhook URL
207207
208208``` 4d
209209// Pull mode — Gmail notifications (polling every 30 seconds, default)
210- $notif:=$google.mail.notification ({ \
210+ $notif:=$google.mail.notifier ({ \
211211 onCreate: Formula(handleNewMail($1)); \
212212 onDelete: Formula(handleDeletedMail($1)); \
213213 onModify: Formula(handleModifiedMail($1)) \
214214})
215215$status:=$notif.start()
216216
217217// Push mode — Gmail notifications via Pub/Sub
218- $notif:=$google.mail.notification ({ \
218+ $notif:=$google.mail.notifier ({ \
219219 topicName: "projects/my-project/topics/gmail-notifications"; \
220220 labelIds: ["INBOX"]; \
221221 onCreate: Formula(handleNewMail($1)) \
222222})
223223$status:=$notif.start()
224224
225225// Pull mode — Calendar notifications (polling every 60 seconds)
226- $calNotif:=$google.calendar.notification ({ \
226+ $calNotif:=$google.calendar.notifier ({ \
227227 timer: 60; \
228228 onCreate: Formula(handleNewEvent($1)); \
229229 onModify: Formula(handleEventUpdate($1)); \
@@ -232,7 +232,7 @@ $calNotif:=$google.calendar.notification({ \
232232$status:=$calNotif.start()
233233
234234// Push mode — Calendar notifications via webhook
235- $calNotif:=$google.calendar.notification ({ \
235+ $calNotif:=$google.calendar.notifier ({ \
236236 endPoint: "https://myserver.com"; \
237237 onCreate: Formula(handleNewEvent($1)) \
238238}; "primary")
0 commit comments