MediaWiki API 结果

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

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

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

{
    "error": {
        "code": "internal_api_error_Wikimedia\\Assert\\PreconditionException",
        "info": "[12973b4858f5fdfdb44439da] 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 /usr/share/mediawiki/vendor/wikimedia/assert/src/Assert.php(49)\nfrom /usr/share/mediawiki/vendor/wikimedia/assert/src/Assert.php(49)\n#0 /usr/share/mediawiki/includes/Title.php(4185): Wikimedia\\Assert\\Assert::precondition()\n#1 /usr/share/mediawiki/includes/Title.php(4168): Title->assertProperPage()\n#2 /usr/share/mediawiki/includes/Revision/RevisionStore.php(1828): Title->getId()\n#3 /usr/share/mediawiki/includes/Revision/RevisionStore.php(1733): MediaWiki\\Revision\\RevisionStore->ensureRevisionRowMatchesPage()\n#4 /usr/share/mediawiki/includes/Revision/RevisionStore.php(1609): MediaWiki\\Revision\\RevisionStore->newRevisionFromRowAndSlots()\n#5 /usr/share/mediawiki/includes/api/ApiFeedContributions.php(240): MediaWiki\\Revision\\RevisionStore->newRevisionFromRow()\n#6 /usr/share/mediawiki/includes/api/ApiFeedContributions.php(209): ApiFeedContributions->feedItem()\n#7 /usr/share/mediawiki/includes/api/ApiMain.php(1904): ApiFeedContributions->execute()\n#8 /usr/share/mediawiki/includes/api/ApiMain.php(879): ApiMain->executeAction()\n#9 /usr/share/mediawiki/includes/api/ApiMain.php(850): ApiMain->executeActionWithErrorHandling()\n#10 /usr/share/mediawiki/api.php(90): ApiMain->execute()\n#11 /usr/share/mediawiki/api.php(45): wfApiMain()\n#12 {main}"
    }
}