API:Watchlistraw
From MediaWiki.org
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
- Create and edit pages
- Move pages
- Merge pages
- Rollback
- Delete pages
- Restore deleted revisions
- (Un)protect pages
- (Un)block users
- (Un)watch pages
- Mark revisions of watched pages as visited
- Send email
- Patrol changes
- Import pages
- Change user group membership
- Upload files
- User options
- Tokens
- Page language
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
- Asserting
Watchlistraw | ||
---|---|---|
This module can be used as a Generator . |
||
Prefix | wr | |
Required rights | none | |
Post only? | No | |
Generated help | Current | |
Version added |
|
Returns a list of all pages on the logged in user's watchlist.
Note: This results of this query module are returned as part of the api
node, not the query
node.
Parameters[edit source]
wrcontinue
: Used to continue a previous requestwrnamespace
: Only list pages in the given namespace(s)wrlimit
: How many total results to return per request No more than 500 (5000 for bots) allowed. (Default: 10)wrprop
: Which additional properties to get (non-generator mode only):changed
: Adds timestamp of when the user was last notified about the edit
wrshow
: Only list items that meet these criteria:changed
: Pages that have changed since the last visit!changed
: Pages that changed before the last visit
wrowner
: The name of the user whose watchlist you'd like to access 1.17+wrtoken
: Give a security token (settable in preferences) to allow access to another user's watchlist 1.17+wrdir
: Direction to sort the titles and namespaces in Possible values:ascending
,descending
. (Default:ascending
) 1.20+
Example[edit source]
List the first 3 pages on the watchlist from the category namespace
Result |
---|
{
"watchlistraw": [
{
"ns": 14,
"title": "Category:2000 disestablishments in Ohio"
},
{
"ns": 14,
"title": "Category:Causeways in the United States"
},
{
"ns": 14,
"title": "Category:Pages with incorrectly substituted templates"
}
]
}
|
Error Codes[edit source]
Code | Info |
---|---|
bad_wlowner | Specified user does not exist. |
bad_wltoken | Incorrect watchlist token provided -- please set a correct token in Special:Preferences. |
notloggedin | You must be logged-in to have a watchlist. |
show | Incorrect parameter - mutually exclusive values may not be supplied. |