MediaWiki API 結果

這是JSON格式的HTML實現。HTML對除錯很有用,但不適合應用程式使用。

指定format參數以變更輸出格式。要查看JSON格式的非HTML實現,設定format=json

參見完整文件,或API說明以取得更多資訊。

{
    "batchcomplete": "",
    "query": {
        "filearchive": [
            {
                "id": 3,
                "name": "0404-6.jpg",
                "ns": 6,
                "title": "\u6a94\u6848:0404-6.jpg",
                "timestamp": "2010-06-20T13:09:10Z"
            },
            {
                "id": 2,
                "name": "0404-6.jpg",
                "ns": 6,
                "title": "\u6a94\u6848:0404-6.jpg",
                "timestamp": "2010-06-20T13:16:36Z"
            },
            {
                "id": 1,
                "name": "Logo.png",
                "ns": 6,
                "title": "\u6a94\u6848:Logo.png",
                "timestamp": "2010-06-20T12:43:28Z"
            },
            {
                "id": 4,
                "name": "Profile_avatar.png",
                "ns": 6,
                "title": "\u6a94\u6848:Profile avatar.png",
                "timestamp": "2012-08-09T02:59:54Z"
            },
            {
                "id": 5,
                "name": "Profile_avatar.png",
                "ns": 6,
                "title": "\u6a94\u6848:Profile avatar.png",
                "timestamp": "2012-08-09T03:01:00Z"
            },
            {
                "id": 7,
                "name": "\u72c2\u4eba.PNG",
                "ns": 6,
                "title": "\u6a94\u6848:\u72c2\u4eba.PNG",
                "timestamp": "2013-12-21T03:46:57Z"
            },
            {
                "id": 8,
                "name": "\u72c2\u4eba.PNG",
                "ns": 6,
                "title": "\u6a94\u6848:\u72c2\u4eba.PNG",
                "timestamp": "2013-12-21T03:53:39Z"
            },
            {
                "id": 9,
                "name": "\u72c2\u4eba.PNG",
                "ns": 6,
                "title": "\u6a94\u6848:\u72c2\u4eba.PNG",
                "timestamp": "2013-12-22T02:54:19Z"
            },
            {
                "id": 10,
                "name": "\u72c2\u4eba.PNG",
                "ns": 6,
                "title": "\u6a94\u6848:\u72c2\u4eba.PNG",
                "timestamp": "2013-12-22T02:56:31Z"
            },
            {
                "id": 6,
                "name": "\u72c2\u4eba.PNG",
                "ns": 6,
                "title": "\u6a94\u6848:\u72c2\u4eba.PNG",
                "timestamp": "2013-12-22T02:57:14Z"
            }
        ]
    }
}{
    "error": {
        "code": "internal_api_error_LogicException",
        "info": "[f3c1ccc36577a97064517b7b] Exception caught: Process cache for 'zh-tw' should be set by now.",
        "errorclass": "LogicException",
        "*": "LogicException at /var/www/html/wiki/includes/cache/MessageCache.php(413)\nfrom /var/www/html/wiki/includes/cache/MessageCache.php(413)\n#0 /var/www/html/wiki/includes/cache/MessageCache.php(1115): MessageCache->load(string)\n#1 /var/www/html/wiki/includes/cache/MessageCache.php(1043): MessageCache->getMsgFromNamespace(string, string)\n#2 /var/www/html/wiki/includes/cache/MessageCache.php(1014): MessageCache->getMessageForLang(LanguageZh_hans, string, boolean, array)\n#3 /var/www/html/wiki/includes/cache/MessageCache.php(956): MessageCache->getMessageFromFallbackChain(LanguageZh_hans, string, boolean)\n#4 /var/www/html/wiki/includes/language/Message.php(1395): MessageCache->get(string, boolean, LanguageZh_hans)\n#5 /var/www/html/wiki/includes/language/Message.php(919): Message->fetchMessage()\n#6 /var/www/html/wiki/includes/language/Message.php(1009): Message->format(string)\n#7 /var/www/html/wiki/includes/OutputPage.php(982): Message->text()\n#8 /var/www/html/wiki/includes/api/ApiFormatBase.php(258): OutputPage->setPageTitle(Message)\n#9 /var/www/html/wiki/includes/api/ApiMain.php(2135): ApiFormatBase->closePrinter()\n#10 /var/www/html/wiki/includes/api/ApiMain.php(1882): ApiMain->printResult()\n#11 /var/www/html/wiki/includes/api/ApiMain.php(853): ApiMain->executeAction()\n#12 /var/www/html/wiki/includes/api/ApiMain.php(824): ApiMain->executeActionWithErrorHandling()\n#13 /var/www/html/wiki/api.php(90): ApiMain->execute()\n#14 /var/www/html/wiki/api.php(45): wfApiMain()\n#15 {main}"
    }
}