5 * Created on Sep 7, 2006
7 * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * http://www.gnu.org/copyleft/gpl.html
28 * This is the main query class. It behaves similar to ApiMain: based on the
29 * parameters given, it will create a list of titles to work on (an ApiPageSet
30 * object), instantiate and execute various property/list/meta modules, and
31 * assemble all resulting data into a single ApiResult object.
33 * In generator mode, a generator will be executed first to populate a second
34 * ApiPageSet object, and that object will be used for all subsequent modules.
38 class ApiQuery
extends ApiBase
{
41 * List of Api Query prop modules
44 private static $QueryPropModules = array(
45 'categories' => 'ApiQueryCategories',
46 'categoryinfo' => 'ApiQueryCategoryInfo',
47 'duplicatefiles' => 'ApiQueryDuplicateFiles',
48 'extlinks' => 'ApiQueryExternalLinks',
49 'images' => 'ApiQueryImages',
50 'imageinfo' => 'ApiQueryImageInfo',
51 'info' => 'ApiQueryInfo',
52 'links' => 'ApiQueryLinks',
53 'iwlinks' => 'ApiQueryIWLinks',
54 'langlinks' => 'ApiQueryLangLinks',
55 'pageprops' => 'ApiQueryPageProps',
56 'revisions' => 'ApiQueryRevisions',
57 'stashimageinfo' => 'ApiQueryStashImageInfo',
58 'templates' => 'ApiQueryLinks',
62 * List of Api Query list modules
65 private static $QueryListModules = array(
66 'allcategories' => 'ApiQueryAllCategories',
67 'allimages' => 'ApiQueryAllImages',
68 'alllinks' => 'ApiQueryAllLinks',
69 'allpages' => 'ApiQueryAllPages',
70 'alltransclusions' => 'ApiQueryAllLinks',
71 'allusers' => 'ApiQueryAllUsers',
72 'backlinks' => 'ApiQueryBacklinks',
73 'blocks' => 'ApiQueryBlocks',
74 'categorymembers' => 'ApiQueryCategoryMembers',
75 'deletedrevs' => 'ApiQueryDeletedrevs',
76 'embeddedin' => 'ApiQueryBacklinks',
77 'exturlusage' => 'ApiQueryExtLinksUsage',
78 'filearchive' => 'ApiQueryFilearchive',
79 'imageusage' => 'ApiQueryBacklinks',
80 'iwbacklinks' => 'ApiQueryIWBacklinks',
81 'langbacklinks' => 'ApiQueryLangBacklinks',
82 'logevents' => 'ApiQueryLogEvents',
83 'pageswithprop' => 'ApiQueryPagesWithProp',
84 'pagepropnames' => 'ApiQueryPagePropNames',
85 'protectedtitles' => 'ApiQueryProtectedTitles',
86 'querypage' => 'ApiQueryQueryPage',
87 'random' => 'ApiQueryRandom',
88 'recentchanges' => 'ApiQueryRecentChanges',
89 'search' => 'ApiQuerySearch',
90 'tags' => 'ApiQueryTags',
91 'usercontribs' => 'ApiQueryContributions',
92 'users' => 'ApiQueryUsers',
93 'watchlist' => 'ApiQueryWatchlist',
94 'watchlistraw' => 'ApiQueryWatchlistRaw',
98 * List of Api Query meta modules
101 private static $QueryMetaModules = array(
102 'allmessages' => 'ApiQueryAllMessages',
103 'siteinfo' => 'ApiQuerySiteinfo',
104 'userinfo' => 'ApiQueryUserInfo',
105 'filerepoinfo' => 'ApiQueryFileRepoInfo',
114 private $mNamedDB = array();
116 private $mGeneratorContinue;
117 private $mUseLegacyContinue;
120 * @param $main ApiMain
121 * @param $action string
123 public function __construct( $main, $action ) {
124 parent
::__construct( $main, $action );
126 $this->mModuleMgr
= new ApiModuleManager( $this );
128 // Allow custom modules to be added in LocalSettings.php
129 global $wgAPIPropModules, $wgAPIListModules, $wgAPIMetaModules;
130 $this->mModuleMgr
->addModules( self
::$QueryPropModules, 'prop' );
131 $this->mModuleMgr
->addModules( $wgAPIPropModules, 'prop' );
132 $this->mModuleMgr
->addModules( self
::$QueryListModules, 'list' );
133 $this->mModuleMgr
->addModules( $wgAPIListModules, 'list' );
134 $this->mModuleMgr
->addModules( self
::$QueryMetaModules, 'meta' );
135 $this->mModuleMgr
->addModules( $wgAPIMetaModules, 'meta' );
137 // Create PageSet that will process titles/pageids/revids/generator
138 $this->mPageSet
= new ApiPageSet( $this );
142 * Overrides to return this instance's module manager.
143 * @return ApiModuleManager
145 public function getModuleManager() {
146 return $this->mModuleMgr
;
150 * Get the query database connection with the given name.
151 * If no such connection has been requested before, it will be created.
152 * Subsequent calls with the same $name will return the same connection
153 * as the first, regardless of the values of $db and $groups
154 * @param string $name Name to assign to the database connection
155 * @param int $db One of the DB_* constants
156 * @param array $groups Query groups
157 * @return DatabaseBase
159 public function getNamedDB( $name, $db, $groups ) {
160 if ( !array_key_exists( $name, $this->mNamedDB
) ) {
161 $this->profileDBIn();
162 $this->mNamedDB
[$name] = wfGetDB( $db, $groups );
163 $this->profileDBOut();
165 return $this->mNamedDB
[$name];
169 * Gets the set of pages the user has requested (or generated)
172 public function getPageSet() {
173 return $this->mPageSet
;
177 * Get the array mapping module names to class names
178 * @deprecated since 1.21, use getModuleManager()'s methods instead
179 * @return array array(modulename => classname)
181 public function getModules() {
182 wfDeprecated( __METHOD__
, '1.21' );
183 return $this->getModuleManager()->getNamesWithClasses();
187 * Get the generators array mapping module names to class names
188 * @deprecated since 1.21, list of generators is maintained by ApiPageSet
189 * @return array array(modulename => classname)
191 public function getGenerators() {
192 wfDeprecated( __METHOD__
, '1.21' );
194 foreach ( $this->mModuleMgr
->getNamesWithClasses() as $name => $class ) {
195 if ( is_subclass_of( $class, 'ApiQueryGeneratorBase' ) ) {
196 $gens[$name] = $class;
203 * Get whether the specified module is a prop, list or a meta query module
204 * @deprecated since 1.21, use getModuleManager()->getModuleGroup()
205 * @param string $moduleName Name of the module to find type for
206 * @return mixed string or null
208 function getModuleType( $moduleName ) {
209 return $this->getModuleManager()->getModuleGroup( $moduleName );
213 * @return ApiFormatRaw|null
215 public function getCustomPrinter() {
216 // If &exportnowrap is set, use the raw formatter
217 if ( $this->getParameter( 'export' ) &&
218 $this->getParameter( 'exportnowrap' ) )
220 return new ApiFormatRaw( $this->getMain(),
221 $this->getMain()->createPrinterByName( 'xml' ) );
228 * Query execution happens in the following steps:
229 * #1 Create a PageSet object with any pages requested by the user
230 * #2 If using a generator, execute it to get a new ApiPageSet object
231 * #3 Instantiate all requested modules.
232 * This way the PageSet object will know what shared data is required,
233 * and minimize DB calls.
234 * #4 Output all normalization and redirect resolution information
235 * #5 Execute all requested modules
237 public function execute() {
238 $this->mParams
= $this->extractRequestParams();
240 // $pagesetParams is a array of parameter names used by the pageset generator
241 // or null if pageset has already finished and is no longer needed
242 // $completeModules is a set of complete modules with the name as key
243 $this->initContinue( $pagesetParams, $completeModules );
245 // Instantiate requested modules
246 $allModules = array();
247 $this->instantiateModules( $allModules, 'prop' );
248 $propModules = $allModules; // Keep a copy
249 $this->instantiateModules( $allModules, 'list' );
250 $this->instantiateModules( $allModules, 'meta' );
252 // Filter modules based on continue parameter
253 $modules = $this->initModules( $allModules, $completeModules, $pagesetParams !== null );
255 // Execute pageset if in legacy mode or if pageset is not done
256 if ( $completeModules === null ||
$pagesetParams !== null ) {
257 // Populate page/revision information
258 $this->mPageSet
->execute();
259 // Record page information (title, namespace, if exists, etc)
260 $this->outputGeneralPageInfo();
262 $this->mPageSet
->executeDryRun();
265 $cacheMode = $this->mPageSet
->getCacheMode();
267 // Execute all unfinished modules
268 /** @var $module ApiQueryBase */
269 foreach ( $modules as $module ) {
270 $params = $module->extractRequestParams();
271 $cacheMode = $this->mergeCacheMode(
272 $cacheMode, $module->getCacheMode( $params ) );
273 $module->profileIn();
275 wfRunHooks( 'APIQueryAfterExecute', array( &$module ) );
276 $module->profileOut();
279 // Set the cache mode
280 $this->getMain()->setCacheMode( $cacheMode );
282 if ( $completeModules === null ) {
283 return; // Legacy continue, we are done
286 // Reformat query-continue result section
287 $result = $this->getResult();
288 $qc = $result->getData();
289 if ( isset( $qc['query-continue'] ) ) {
290 $qc = $qc['query-continue'];
291 $result->unsetValue( null, 'query-continue' );
292 } elseif ( $this->mGeneratorContinue
!== null ) {
295 // no more "continue"s, we are done!
299 // we are done with all the modules that do not have result in query-continue
300 $completeModules = array_merge( $completeModules, array_diff_key( $modules, $qc ) );
301 if ( $pagesetParams !== null ) {
302 // The pageset is still in use, check if all props have finished
303 $incompleteProps = array_intersect_key( $propModules, $qc );
304 if ( count( $incompleteProps ) > 0 ) {
305 // Properties are not done, continue with the same pageset state - copy current parameters
306 $main = $this->getMain();
307 $contValues = array();
308 foreach ( $pagesetParams as $param ) {
309 // The param name is already prefix-encoded
310 $contValues[$param] = $main->getVal( $param );
312 } elseif ( $this->mGeneratorContinue
!== null ) {
313 // Move to the next set of pages produced by pageset, properties need to be restarted
314 $contValues = $this->mGeneratorContinue
;
315 $pagesetParams = array_keys( $contValues );
316 $completeModules = array_diff_key( $completeModules, $propModules );
318 // Done with the pageset, finish up with the the lists and meta modules
319 $pagesetParams = null;
323 $continue = '||' . implode( '|', array_keys( $completeModules ) );
324 if ( $pagesetParams !== null ) {
325 // list of all pageset parameters to use in the next request
326 $continue = implode( '|', $pagesetParams ) . $continue;
328 // we are done with the pageset
329 $contValues = array();
330 $continue = '-' . $continue;
332 $contValues['continue'] = $continue;
333 foreach ( $qc as $qcModule ) {
334 foreach ( $qcModule as $qcKey => $qcValue ) {
335 $contValues[$qcKey] = $qcValue;
338 $this->getResult()->addValue( null, 'continue', $contValues );
342 * Parse 'continue' parameter into the list of complete modules and a list of generator parameters
343 * @param array|null $pagesetParams returns list of generator params or null if pageset is done
344 * @param array|null $completeModules returns list of finished modules (as keys), or null if legacy
346 private function initContinue( &$pagesetParams, &$completeModules ) {
347 $pagesetParams = array();
348 $continue = $this->mParams
['continue'];
349 if ( $continue !== null ) {
350 $this->mUseLegacyContinue
= false;
351 if ( $continue !== '' ) {
352 // Format: ' pagesetParam1 | pagesetParam2 || module1 | module2 | module3 | ...
353 // If pageset is done, use '-'
354 $continue = explode( '||', $continue );
355 $this->dieContinueUsageIf( count( $continue ) !== 2 );
356 if ( $continue[0] === '-' ) {
357 $pagesetParams = null; // No need to execute pageset
358 } elseif ( $continue[0] !== '' ) {
359 // list of pageset params that might need to be repeated
360 $pagesetParams = explode( '|', $continue[0] );
362 $continue = $continue[1];
364 if ( $continue !== '' ) {
365 $completeModules = array_flip( explode( '|', $continue ) );
367 $completeModules = array();
370 $this->mUseLegacyContinue
= true;
371 $completeModules = null;
376 * Validate sub-modules, filter out completed ones, and do requestExtraData()
377 * @param array $allModules An dict of name=>instance of all modules requested by the client
378 * @param array|null $completeModules list of finished modules, or null if legacy continue
379 * @param bool $usePageset True if pageset will be executed
380 * @return array of modules to be processed during this execution
382 private function initModules( $allModules, $completeModules, $usePageset ) {
383 $modules = $allModules;
384 $tmp = $completeModules;
385 $wasPosted = $this->getRequest()->wasPosted();
387 /** @var $module ApiQueryBase */
388 foreach ( $allModules as $moduleName => $module ) {
389 if ( !$wasPosted && $module->mustBePosted() ) {
390 $this->dieUsageMsgOrDebug( array( 'mustbeposted', $moduleName ) );
392 if ( $completeModules !== null && array_key_exists( $moduleName, $completeModules ) ) {
393 // If this module is done, mark all its params as used
394 $module->extractRequestParams();
395 // Make sure this module is not used during execution
396 unset( $modules[$moduleName] );
397 unset( $tmp[$moduleName] );
398 } elseif ( $completeModules === null ||
$usePageset ) {
399 // Query modules may optimize data requests through the $this->getPageSet()
400 // object by adding extra fields from the page table.
401 // This function will gather all the extra request fields from the modules.
402 $module->requestExtraData( $this->mPageSet
);
404 // Error - this prop module must have finished before generator is done
405 $this->dieContinueUsageIf( $this->mModuleMgr
->getModuleGroup( $moduleName ) === 'prop' );
408 $this->dieContinueUsageIf( $completeModules !== null && count( $tmp ) !== 0 );
413 * Update a cache mode string, applying the cache mode of a new module to it.
414 * The cache mode may increase in the level of privacy, but public modules
415 * added to private data do not decrease the level of privacy.
417 * @param $cacheMode string
418 * @param $modCacheMode string
421 protected function mergeCacheMode( $cacheMode, $modCacheMode ) {
422 if ( $modCacheMode === 'anon-public-user-private' ) {
423 if ( $cacheMode !== 'private' ) {
424 $cacheMode = 'anon-public-user-private';
426 } elseif ( $modCacheMode === 'public' ) {
427 // do nothing, if it's public already it will stay public
429 $cacheMode = 'private';
435 * Create instances of all modules requested by the client
436 * @param array $modules to append instantiated modules to
437 * @param string $param Parameter name to read modules from
439 private function instantiateModules( &$modules, $param ) {
440 if ( isset( $this->mParams
[$param] ) ) {
441 foreach ( $this->mParams
[$param] as $moduleName ) {
442 $instance = $this->mModuleMgr
->getModule( $moduleName, $param );
443 if ( $instance === null ) {
444 ApiBase
::dieDebug( __METHOD__
, 'Error instantiating module' );
446 // Ignore duplicates. TODO 2.0: die()?
447 if ( !array_key_exists( $moduleName, $modules ) ) {
448 $modules[$moduleName] = $instance;
455 * Appends an element for each page in the current pageSet with the
456 * most general information (id, title), plus any title normalizations
457 * and missing or invalid title/pageids/revids.
459 private function outputGeneralPageInfo() {
460 $pageSet = $this->getPageSet();
461 $result = $this->getResult();
463 // We don't check for a full result set here because we can't be adding
464 // more than 380K. The maximum revision size is in the megabyte range,
465 // and the maximum result size must be even higher than that.
467 $values = $pageSet->getNormalizedTitlesAsResult( $result );
469 $result->addValue( 'query', 'normalized', $values );
471 $values = $pageSet->getConvertedTitlesAsResult( $result );
473 $result->addValue( 'query', 'converted', $values );
475 $values = $pageSet->getInterwikiTitlesAsResult( $result, $this->mParams
['iwurl'] );
477 $result->addValue( 'query', 'interwiki', $values );
479 $values = $pageSet->getRedirectTitlesAsResult( $result );
481 $result->addValue( 'query', 'redirects', $values );
483 $values = $pageSet->getMissingRevisionIDsAsResult( $result );
485 $result->addValue( 'query', 'badrevids', $values );
491 // Report any missing titles
492 foreach ( $pageSet->getMissingTitles() as $fakeId => $title ) {
494 ApiQueryBase
::addTitleInfo( $vals, $title );
495 $vals['missing'] = '';
496 $pages[$fakeId] = $vals;
498 // Report any invalid titles
499 foreach ( $pageSet->getInvalidTitles() as $fakeId => $title ) {
500 $pages[$fakeId] = array( 'title' => $title, 'invalid' => '' );
502 // Report any missing page ids
503 foreach ( $pageSet->getMissingPageIDs() as $pageid ) {
504 $pages[$pageid] = array(
509 // Report special pages
510 /** @var $title Title */
511 foreach ( $pageSet->getSpecialTitles() as $fakeId => $title ) {
513 ApiQueryBase
::addTitleInfo( $vals, $title );
514 $vals['special'] = '';
515 if ( $title->isSpecialPage() &&
516 !SpecialPageFactory
::exists( $title->getDBkey() ) ) {
517 $vals['missing'] = '';
518 } elseif ( $title->getNamespace() == NS_MEDIA
&&
519 !wfFindFile( $title ) ) {
520 $vals['missing'] = '';
522 $pages[$fakeId] = $vals;
525 // Output general page information for found titles
526 foreach ( $pageSet->getGoodTitles() as $pageid => $title ) {
528 $vals['pageid'] = $pageid;
529 ApiQueryBase
::addTitleInfo( $vals, $title );
530 $pages[$pageid] = $vals;
533 if ( count( $pages ) ) {
534 if ( $this->mParams
['indexpageids'] ) {
535 $pageIDs = array_keys( $pages );
536 // json treats all map keys as strings - converting to match
537 $pageIDs = array_map( 'strval', $pageIDs );
538 $result->setIndexedTagName( $pageIDs, 'id' );
539 $result->addValue( 'query', 'pageids', $pageIDs );
542 $result->setIndexedTagName( $pages, 'page' );
543 $result->addValue( 'query', 'pages', $pages );
545 if ( $this->mParams
['export'] ) {
546 $this->doExport( $pageSet, $result );
551 * This method is called by the generator base when generator in the smart-continue
552 * mode tries to set 'query-continue' value. ApiQuery stores those values separately
553 * until the post-processing when it is known if the generation should continue or repeat.
554 * @param ApiQueryGeneratorBase $module generator module
555 * @param string $paramName
556 * @param mixed $paramValue
557 * @return bool true if processed, false if this is a legacy continue
559 public function setGeneratorContinue( $module, $paramName, $paramValue ) {
560 if ( $this->mUseLegacyContinue
) {
563 $paramName = $module->encodeParamName( $paramName );
564 if ( $this->mGeneratorContinue
=== null ) {
565 $this->mGeneratorContinue
= array();
567 $this->mGeneratorContinue
[$paramName] = $paramValue;
572 * @param $pageSet ApiPageSet Pages to be exported
573 * @param $result ApiResult Result to output to
575 private function doExport( $pageSet, $result ) {
576 $exportTitles = array();
577 $titles = $pageSet->getGoodTitles();
578 if ( count( $titles ) ) {
579 $user = $this->getUser();
580 /** @var $title Title */
581 foreach ( $titles as $title ) {
582 if ( $title->userCan( 'read', $user ) ) {
583 $exportTitles[] = $title;
588 $exporter = new WikiExporter( $this->getDB() );
589 // WikiExporter writes to stdout, so catch its
592 $exporter->openStream();
593 foreach ( $exportTitles as $title ) {
594 $exporter->pageByTitle( $title );
596 $exporter->closeStream();
597 $exportxml = ob_get_contents();
600 // Don't check the size of exported stuff
601 // It's not continuable, so it would cause more
602 // problems than it'd solve
603 $result->disableSizeCheck();
604 if ( $this->mParams
['exportnowrap'] ) {
606 // Raw formatter will handle this
607 $result->addValue( null, 'text', $exportxml );
608 $result->addValue( null, 'mime', 'text/xml' );
611 ApiResult
::setContent( $r, $exportxml );
612 $result->addValue( 'query', 'export', $r );
614 $result->enableSizeCheck();
617 public function getAllowedParams( $flags = 0 ) {
620 ApiBase
::PARAM_ISMULTI
=> true,
621 ApiBase
::PARAM_TYPE
=> $this->mModuleMgr
->getNames( 'prop' )
624 ApiBase
::PARAM_ISMULTI
=> true,
625 ApiBase
::PARAM_TYPE
=> $this->mModuleMgr
->getNames( 'list' )
628 ApiBase
::PARAM_ISMULTI
=> true,
629 ApiBase
::PARAM_TYPE
=> $this->mModuleMgr
->getNames( 'meta' )
631 'indexpageids' => false,
633 'exportnowrap' => false,
638 $result +
= $this->getPageSet()->getFinalParams( $flags );
644 * Override the parent to generate help messages for all available query modules.
647 public function makeHelpMsg() {
649 // Use parent to make default message for the query module
650 $msg = parent
::makeHelpMsg();
652 $querySeparator = str_repeat( '--- ', 12 );
653 $moduleSeparator = str_repeat( '*** ', 14 );
654 $msg .= "\n$querySeparator Query: Prop $querySeparator\n\n";
655 $msg .= $this->makeHelpMsgHelper( 'prop' );
656 $msg .= "\n$querySeparator Query: List $querySeparator\n\n";
657 $msg .= $this->makeHelpMsgHelper( 'list' );
658 $msg .= "\n$querySeparator Query: Meta $querySeparator\n\n";
659 $msg .= $this->makeHelpMsgHelper( 'meta' );
660 $msg .= "\n\n$moduleSeparator Modules: continuation $moduleSeparator\n\n";
666 * For all modules of a given group, generate help messages and join them together
667 * @param string $group Module group
670 private function makeHelpMsgHelper( $group ) {
671 $moduleDescriptions = array();
673 $moduleNames = $this->mModuleMgr
->getNames( $group );
674 sort( $moduleNames );
675 foreach ( $moduleNames as $name ) {
677 * @var $module ApiQueryBase
679 $module = $this->mModuleMgr
->getModule( $name );
681 $msg = ApiMain
::makeHelpMsgHeader( $module, $group );
682 $msg2 = $module->makeHelpMsg();
683 if ( $msg2 !== false ) {
686 if ( $module instanceof ApiQueryGeneratorBase
) {
687 $msg .= "Generator:\n This module may be used as a generator\n";
689 $moduleDescriptions[] = $msg;
692 return implode( "\n", $moduleDescriptions );
695 public function shouldCheckMaxlag() {
699 public function getParamDescription() {
700 return $this->getPageSet()->getFinalParamDescription() +
array(
701 'prop' => 'Which properties to get for the titles/revisions/pageids. Module help is available below',
702 'list' => 'Which lists to get. Module help is available below',
703 'meta' => 'Which metadata to get about the site. Module help is available below',
704 'indexpageids' => 'Include an additional pageids section listing all returned page IDs',
705 'export' => 'Export the current revisions of all given or generated pages',
706 'exportnowrap' => 'Return the export XML without wrapping it in an XML result (same format as Special:Export). Can only be used with export',
707 'iwurl' => 'Whether to get the full URL if the title is an interwiki link',
709 'When present, formats query-continue as key-value pairs that should simply be merged into the original request.',
710 'This parameter must be set to an empty string in the initial query.',
711 'This parameter is recommended for all new development, and will be made default in the next API version.' ),
715 public function getDescription() {
717 'Query API module allows applications to get needed pieces of data from the MediaWiki databases,',
718 'and is loosely based on the old query.php interface.',
719 'All data modifications will first have to use query to acquire a token to prevent abuse from malicious sites'
723 public function getPossibleErrors() {
725 parent
::getPossibleErrors(),
726 $this->getPageSet()->getFinalPossibleErrors()
730 public function getExamples() {
732 'api.php?action=query&prop=revisions&meta=siteinfo&titles=Main%20Page&rvprop=user|comment&continue=',
733 'api.php?action=query&generator=allpages&gapprefix=API/&prop=revisions&continue=',
737 public function getHelpUrls() {
739 'https://www.mediawiki.org/wiki/API:Query',
740 'https://www.mediawiki.org/wiki/API:Meta',
741 'https://www.mediawiki.org/wiki/API:Properties',
742 'https://www.mediawiki.org/wiki/API:Lists',