Aide de l’API MediaWiki

Ceci est une page d’aide de l’API de MediaWiki générée automatiquement.

Documentation et exemples : https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=notifications

(main | notifications)
  • Ce module nécessite des droits de lecture.
  • Source : Reverb
  • Licence : GPL-2.0-or-later

Retrieve notifications for the current user.

Paramètres :
do

The end point action to perform such as getNotificationsForUser.

Ce paramètre est obligatoire.
page

The page number starting point of notifications to retrieve.

Ce paramètre est obligatoire.
Type: entier
Par défaut : 0
itemsPerPage

The number of notifications to return per page retrieved.

Ce paramètre est obligatoire.
Type: entier
Par défaut : 50
type

The type of notifications to return in the response. Accepts a comma delimited list of types.

read

Return only read notifications in the response.

Type: entier
unread

Return only unread notifications in the response.

Type: entier
notificationId

The notification ID passed to dismissNotification to be dismissed taken from the original response from getNotificationsForUser.

dismissedAt

The Unix Epoch formatted timestamp of when the notification was read. To mark a notification as unread set this to 0.

Type: entier
Exemples :
Get all notifications for the logged in user limited by the current page number and number of items per page.
api.php?action=notifications&do=getNotificationsForUser&page=0&itemsPerPage=50 [ouvrir dans le bac à sable]
Make a POST request with the notification ID and the Unix Epoch formatted timestamp of the dismissed time. Set dismissedAt to zero to mark a notification as unread. Logged in users can only dismiss their own notifications.
api.php?action=notifications&do=dismissNotification&notificationId=1&dismissedAt=1562006555 [ouvrir dans le bac à sable]
Make a POST request to mark all notifications for the logged in user as read.
api.php?action=notifications&do=dismissAllNotifications [ouvrir dans le bac à sable]