MediaWiki API 结果

这是JSON格式的HTML实现。HTML对调试很有用,但不适合应用程序使用。

指定format参数以更改输出格式。要查看JSON格式的非HTML实现,设置format=json

参见完整文档,或API帮助以获取更多信息。

{
    "error": {
        "code": "internal_api_error_Wikimedia\\Assert\\PreconditionException",
        "info": "[0a4cf868b3dc957d0994e505] Exception caught: Precondition failed: This Title instance does not represent a proper page, but merely a link target.",
        "errorclass": "Wikimedia\\Assert\\PreconditionException",
        "*": "Wikimedia\\Assert\\PreconditionException at /var/www/ubuntuwiki/vendor/wikimedia/assert/src/Assert.php(49)\nfrom /var/www/ubuntuwiki/vendor/wikimedia/assert/src/Assert.php(49)\n#0 /var/www/ubuntuwiki/includes/title/Title.php(3891): Wikimedia\\Assert\\Assert::precondition()\n#1 /var/www/ubuntuwiki/includes/title/Title.php(3872): MediaWiki\\Title\\Title->assertProperPage()\n#2 /var/www/ubuntuwiki/includes/Revision/RevisionStore.php(1830): MediaWiki\\Title\\Title->getId()\n#3 /var/www/ubuntuwiki/includes/Revision/RevisionStore.php(1735): MediaWiki\\Revision\\RevisionStore->ensureRevisionRowMatchesPage()\n#4 /var/www/ubuntuwiki/includes/Revision/RevisionStore.php(1613): MediaWiki\\Revision\\RevisionStore->newRevisionFromRowAndSlots()\n#5 /var/www/ubuntuwiki/includes/api/ApiFeedContributions.php(221): MediaWiki\\Revision\\RevisionStore->newRevisionFromRow()\n#6 /var/www/ubuntuwiki/includes/api/ApiFeedContributions.php(190): ApiFeedContributions->feedItem()\n#7 /var/www/ubuntuwiki/includes/api/ApiMain.php(1946): ApiFeedContributions->execute()\n#8 /var/www/ubuntuwiki/includes/api/ApiMain.php(922): ApiMain->executeAction()\n#9 /var/www/ubuntuwiki/includes/api/ApiMain.php(893): ApiMain->executeActionWithErrorHandling()\n#10 /var/www/ubuntuwiki/includes/api/ApiEntryPoint.php(158): ApiMain->execute()\n#11 /var/www/ubuntuwiki/includes/MediaWikiEntryPoint.php(199): MediaWiki\\Api\\ApiEntryPoint->execute()\n#12 /var/www/ubuntuwiki/api.php(44): MediaWiki\\MediaWikiEntryPoint->run()\n#13 {main}"
    }
}