);
}
- public function getResultProperties() {
- return array(
- '' => array(
- 'type' => array(
- ApiBase::PROP_TYPE => array(
- 'edit',
- 'new',
- 'move',
- 'log',
- 'move over redirect'
- )
- )
- ),
- 'ids' => array(
- 'pageid' => 'integer',
- 'revid' => 'integer',
- 'old_revid' => 'integer'
- ),
- 'title' => array(
- 'ns' => 'namespace',
- 'title' => 'string'
- ),
- 'user' => array(
- 'user' => 'string',
- 'anon' => 'boolean'
- ),
- 'userid' => array(
- 'userid' => 'integer',
- 'anon' => 'boolean'
- ),
- 'flags' => array(
- 'new' => 'boolean',
- 'minor' => 'boolean',
- 'bot' => 'boolean'
- ),
- 'patrol' => array(
- 'patrolled' => 'boolean'
- ),
- 'timestamp' => array(
- 'timestamp' => 'timestamp'
- ),
- 'sizes' => array(
- 'oldlen' => 'integer',
- 'newlen' => 'integer'
- ),
- 'notificationtimestamp' => array(
- 'notificationtimestamp' => array(
- ApiBase::PROP_TYPE => 'timestamp',
- ApiBase::PROP_NULLABLE => true
- )
- ),
- 'comment' => array(
- 'comment' => array(
- ApiBase::PROP_TYPE => 'string',
- ApiBase::PROP_NULLABLE => true
- )
- ),
- 'parsedcomment' => array(
- 'parsedcomment' => array(
- ApiBase::PROP_TYPE => 'string',
- ApiBase::PROP_NULLABLE => true
- )
- ),
- 'loginfo' => array(
- 'logid' => array(
- ApiBase::PROP_TYPE => 'integer',
- ApiBase::PROP_NULLABLE => true
- ),
- 'logtype' => array(
- ApiBase::PROP_TYPE => $this->getConfig()->get( 'LogTypes' ),
- ApiBase::PROP_NULLABLE => true
- ),
- 'logaction' => array(
- ApiBase::PROP_TYPE => 'string',
- ApiBase::PROP_NULLABLE => true
- )
- )
- );
- }
-
public function getDescription() {
return "Get all recent changes to pages in the logged in user's watchlist.";
}
- public function getPossibleErrors() {
- return array_merge( parent::getPossibleErrors(), array(
- array( 'code' => 'bad_wlowner', 'info' => 'Specified user does not exist' ),
- array(
- 'code' => 'bad_wltoken',
- 'info' => 'Incorrect watchlist token provided -- ' .
- 'please set a correct token in Special:Preferences'
- ),
- array( 'code' => 'notloggedin', 'info' => 'You must be logged-in to have a watchlist' ),
- array( 'code' => 'patrol', 'info' => 'patrol property is not available' ),
- array( 'show' ),
- array(
- 'code' => 'permissiondenied',
- 'info' => 'You need the patrol right to request the patrolled flag'
- ),
- array( 'code' => 'user-excludeuser', 'info' => 'user and excludeuser cannot be used together' ),
- ) );
- }
-
public function getExamples() {
return array(
'api.php?action=query&list=watchlist',