API:Watch/zh

POST request to add or remove pages from a watchlist.

例子
发出任何POST请求都是一个多步骤的过程：

 使用中描述的方法之一登录.  获取.

The sample query above is for wikis running MediaWiki 1.24+.

For wikis running earlier versions of MediaWiki, tokens for this operation can be obtained via  with   (MediaWiki 1.20+), or by using the following query:

 发送带有CSRF令牌的POST请求以在页面上执行操作.  

下面的示例代码详细介绍了最后一步.

参数历史

 * v1.25: 棄用
 * v1.23: 启用      ；棄用
 * v1.21: 启用

补充资料

 * When running the sample code via a bot, make sure that the bot has the  option set to, by visiting the Special:BotPasswords page.
 * This module uses CSRF tokens, not watchlist tokens. CSRF tokens are generally used for POST requests and wiki-modifying actions throughout the, whereas watchlist tokens are used specifically to view another user's watchlist.
 * Unlike, which allows you to read an account's private watchlist without logging in, this module requires you to log directly into the account you want to alter.

参见

 * - gets a watchlist
 * - gets an RSS or Atom feed of a user's watchlist