Saltar al contenido principal

Function: notifications()

Call Signature​

function notifications(
context,
siteUrl,
options
): Promise<ListPage<Notification>>;

Defined in: areas/messages/messages.ts:83

The person's notifications, newest first, only the unread ones when asked. With limit, a page of them (see "Long lists" in the docs' concepts): Moodle's service gives only the page, or, for the unread ones, batches until the page is full (it has no unread filter).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
optionsWithLimit<NotificationOptions>

Returns​

Promise<ListPage<Notification>>

Call Signature​

function notifications(
context,
siteUrl,
options?
): Promise<Notification[]>;

Defined in: areas/messages/messages.ts:84

The person's notifications, newest first, only the unread ones when asked. With limit, a page of them (see "Long lists" in the docs' concepts): Moodle's service gives only the page, or, for the unread ones, batches until the page is full (it has no unread filter).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
options?WithoutLimit<NotificationOptions>

Returns​

Promise<Notification[]>

Call Signature​

function notifications(
context,
siteUrl,
options?
): Promise<
| ListPage<Notification>
| Notification[]>;

Defined in: areas/messages/messages.ts:85

The person's notifications, newest first, only the unread ones when asked. With limit, a page of them (see "Long lists" in the docs' concepts): Moodle's service gives only the page, or, for the unread ones, batches until the page is full (it has no unread filter).

Parameters​

ParameterType
contextBrowserContext
siteUrlstring
options?NotificationOptions

Returns​

Promise< | ListPage<Notification> | Notification[]>