API:Watchlistraw
From MediaWiki.org
| This page is part of the MediaWiki API documentation. |
| Language: | English |
|---|
Quick overview:
- Quick start guide
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Authentication
- Queries
- Search suggestions
- Expanding templates and rendering
- Purging pages' caches
- Parameter information
- Changing wiki content
- Watchlist feed
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
| MediaWiki version: | 1.14 |
Returns a list of all pages on the logged in users watchlist.
[edit] Parameters
wrcontinue: Used to continue a previous requestwrnamespace: Only list pages in the given namespace(s)wrlimit: How many total results to return per requestwrprop: 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!changed
wrowner: The name of the user whose watchlist you'd like to accesswrtoken: Give a security token (settable in preferences) to allow access to another user's watchlist
[edit] Example
List the first 3 pages on the watchlist from the category namespace
Note: This query module return its result direct under api, not under query like other query modules.
<?xml version="1.0" encoding="utf-8"?> <api> <watchlistraw> <wr ns="14" title="Categorie:Things"/> <wr ns="14" title="Categorie:More things"/> <wr ns="14" title="Categorie:Even more things"/> </watchlistraw> <query-continue> <watchlistraw wrcontinue="14|ATP-toernooi van Stuttgart"/> </query-continue> </api>
[edit] Errors Codes
- bad_wlowner – Specified user does not exist.
- bad_wltoken – Incorrect watchlist token provided -- please set a correct token in Special:Preferences.
- invalidtitle – Bad title ``title''.
- invalidtitle – Bad title ``key''.
- notloggedin – You must be logged-in to have a watchlist.
- readapidenied – You need read permission to use this module.
- show – Incorrect parameter - mutually exclusive values may not be supplied.