Wikimedia Product Infrastructure team/Push Notifications Infrastructure/Client integration
Client integration[edit]
Local setup[edit]
TBD
Echo usage for push-notifications[edit]
In order to get notification data from Echo, clients will need to fetch it from mwapi. To get the data structured hit api.php?action=query¬wikis=*¬format=model
, the output should look like the following JSON:
{ "batchcomplete": "", "query": { "notifications": { "list": [ { "wiki": "mediawikiwiki", "id": 795139, "type": "flow-thank", "category": "edit-thank", "section": "message", "timestamp": { "utciso8601": "2018-08-18T18:03:17Z", "utcunix": 1534615397, "unix": "1534615397", "utcmw": "20180818180317", "mw": "20180818180317", "date": "18 August" }, "title": { "full": "Talk:Page of the discussion", "namespace": "Talk", "namespace-key": 1, "text": "Page of the discussion" }, "agent": { "id": 7, "name": "SomeUser" }, "read": "20180918184003", "targetpages": [], "*": { "header": "SomeUser thanked you for your comment in \"Topic_title\".", "compactHeader": "SomeUser thanked you.", "body": "Hello @SomeUser, we have worked on this issue for a while, as you can see here…", "icon": "thanks", "links": { "primary": { "url": "https://www.mediawiki.org/wiki/link/to/the/topic", "label": "View comment" }, "secondary": [ { "url": "https://www.mediawiki.org/wiki/User:SomeUser", "label": "SomeUser", "tooltip": "", "description": "", "icon": "userAvatar", "prioritized": "" }, { "url": "https://www.mediawiki.org/wiki/Talk:Page_of_the_discussion", "label": "Page of the discussion...", "tooltip": "Talk:Page of the discussion", "description": "", "icon": "speechBubbles", "prioritized": "" } ] }, "iconUrl": "/w/extensions/Thanks/userTalk-constructive-ltr.svg" } } ], "continue": null } } }