Extension:MobileFrontend/MobileViewAPI/ja
Outdated translations are marked like this.
この機能は、バージョン 1.39 で完全に除去されました。 Please use Page Content Service |
このAPIは、MobileFrontend拡張機能が提供していますが、 そうでなく私たちはMobile Content Serviceを優遇しています。 これらのAPIは自己責任で使用してください。 いずれ廃止予定とされ消される可能性があります(とはいえ十分にお知らせしてからです)。 使用している場合は、トークページであなたの懸念事項をお知らせください。
廃止計画
The noimages
property was removed in 2019.
See phab:T99009.
API
mobileview | |
---|---|
このモジュールは generator としては使用できません。 | |
接頭辞 | |
必要な権限 | なし |
POST のみ? | いいえ |
自動生成ヘルプ | 現行バージョン |
Delivers content optimized for mobile devices for use by mobile apps and dynamic section views.
Almost like a restricted-functionality action=parse
, but more flexible and returns separate sections that are always obtained from full-page parse.
パラメーター:
page
|
Title of page to process. |
sections
|
Pipe-separated list of section numbers for which to return text or all for all sections.
|
redirect
|
Whether redirects should be followed, yes (default) or no . This parameter is intentionally made similar to the one to index.php .
|
prop
|
Which information to get:
|
sectionprop
|
What information about sections to get: pipe-separated list of value types defined by parser. It's the same as in action=parse: toclevel, level, line, number, index, fromtitle, anchor. "byteoffset" has been excluded as it makes no sense for this action. |
noheadings
|
Return HTML without headings. |
Returned section information also includes the id
for every section - its zero-based number; and for sections that contains references added by Cite , there's also references
data member.
例:
api.php? action=mobileview& page=Extension:MobileFrontend/Example& sections=0& prop=text| [ApiSandbox で試用する]
結果 |
---|
{
"mobileview": {
"sections": [
{
"id": 0,
"text": "<p>Hi<sup id=\"cite_ref-1\" class=\"reference\"><a href=\"#cite_note-1\">[1]</a></sup></p>"
},
{
"toclevel": 1,
"line": "This is first section",
"id": 1
},
{
"toclevel": 2,
"line": "This is nested section",
"id": 2
},
{
"toclevel": 1,
"line": "References",
"id": 3,
"references": ""
}
]
}
}
|
XML での同じリクエスト:
api.php? action=mobileview& page=Extension:MobileFrontend/Example& sections=0& prop=text|& format=xml [ApiSandbox で試用する]
結果 |
---|
<?xml version="1.0"?>
<api>
<mobileview>
<sections>
<section id="0" xml:space="preserve"><p>Hi<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[1]</a></sup></p></section>
<section toclevel="1" line="This is first section" id="1" />
<section toclevel="2" line="This is nested section" id="2" />
<section toclevel="1" line="References" id="3" references="" />
</sections>
</mobileview>
</api>
|