API:SetNotificationTimestamp
From MediaWiki.org
| Language: | English • 日本語 |
|---|
| This page is part of the MediaWiki action API documentation. |
MediaWiki action API
- Introduction and quick start
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Searching (by title, content, coordinates...)
- Parsing wikitext and expanding templates
- Purging pages' caches
- Parameter information
- Changing wiki content
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
- Asserting
| setnotificationtimestamp | ||
|---|---|---|
| Prefix | none | |
| Required rights | none | |
| Post only? | Yes | |
| Generated help | Current | |
| Version added |
|
|
This module is used to mark revisions of watched pages as visited. This affects the highlighting of changed pages in the watchlist and history, and the sending of email when the "Email me when a page on my watchlist is changed" preference is enabled.
This module requires POST requests; GET requests will not work.
Token[edit | edit source]
Users of this module must be correctly logged in, as a valid edit token is required. For example:
Obtaining an edit token
| Result |
|---|
<?xml version="1.0"?>
<api>
<query>
<pages>
<page
pageid="15580374"
ns="0"
title="Main Page"
contentmodel="wikitext"
pagelanguage="en"
touched="2013-12-26T14:54:02Z"
lastrevid="574690625"
counter=""
length="6391"
starttimestamp="2013-12-26T15:14:00Z"
edittoken="1ccc023d58931de3acc6c39c7af2e420+\"
/>
</pages>
</query>
</api>
|
Parameters[edit | edit source]
entirewatchlist: Work on all watched pages.token: Edit token retrieved in previous step (required).timestamp: Timestamp to which to set the notification timestamp.torevid: Revision to set the notification timestamp to (one page only).newerthanrevid: Revision to set the notification timestamp newer than (one page only).titles: A list of titles to work on. Standard rules and limits apply. (See API:Query#Specifying pages.)pageids: A list of page IDs to work on. Standard rules and limits apply.revids: A list of revision IDs to work on. Standard rules and limits apply.redirects: Automatically resolve redirects.converttitles: Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion. Languages that support variant conversion include gan, iu, kk, ku, shi, sr, tg, uz, zh.generator: Get the list of pages to work on using a generator. (See API:Query#Generators.)
Examples[edit | edit source]
Marking entire watchlist as visited
api.php? action=setnotificationtimestamp& entirewatchlist=& token=1ccc023d58931de3acc6c39c7af2e420+\ [try in ApiSandbox]
| Result |
|---|
<?xml version="1.0"?>
<api>
<setnotificationtimestamp notificationtimestamp="" />
</api>
|
Marking all edits to "Wikipedia talk:Sandbox" since 1 January 2012 as unviewed
api.php? action=setnotificationtimestamp& titles=Wikipedia:Sandbox& timestamp=2012-01-01T00:00:00Z& token=1ccc023d58931de3acc6c39c7af2e420+\ [try in ApiSandbox]
| Result |
|---|
<?xml version="1.0"?>
<api>
<setnotificationtimestamp>
<page ns="4" title="Wikipedia:Sandbox" notificationtimestamp="2012-01-01T00:00:00Z" />
</setnotificationtimestamp>
</api>
|