API:Parameter information/de

From MediaWiki.org
Jump to: navigation, search
Tools clipart.png Diese Seite ist Teil der deutschen Übersetzung der MediaWiki-API-Dokumentation.
Sprache: English  • Deutsch
MediaWiki-API
MediaWiki version: 1.12

Contents

[edit] Verfügbare Parameter abfragen

Mit action=paraminfo kannst du Informationen über Module und ihre verfügbaren Parameter abfragen.

[edit] Parameter

  • modules: Liste von höheren (Top-Level-)Modulen (Wert des Parameters action=)
  • querymodules: Liste von Querymodulen (Wert der Parameter prop=, meta= und list=)

[edit] Beispiel

Informationen über action=parse und prop=info erhalten

<?xml version="1.0" encoding="utf-8"?>
<api>
  <paraminfo>
    <modules>
      <module classname="ApiParse" description="This module parses wikitext and returns parser output" prefix="" name="parse">
        <parameters>
          <param name="title" default="API" description="Title of page the text belongs to" />
          <param name="text" />
          <param name="page" />
          <param name="oldid" />
          <param name="prop" default="text|langlinks|categories|links|templates|images|externallinks|sections|revid" multi="" limit="500" description="Which pieces of information to get.&#10;NOTE: Section tree is only generated if there are more than 4 sections, or if the __TOC__ keyword is present">
            <type>
              <t>text</t>
              <t>langlinks</t>
              <t>categories</t>
              <t>links</t>
              <t>templates</t>
              <t>images</t>
              <t>externallinks</t>
              <t>sections</t>
              <t>revid</t>
            </type>
          </param>
        </parameters>
      </module>
    </modules>
    <querymodules>
      <module classname="ApiQueryInfo" description="Get basic page information such as namespace, title, last touched date, ..." prefix="in" name="info">
        <parameters>
          <param name="prop" multi="" limit="500" description="Which additional properties to get:&#10; &quot;protection&quot;   - List the protection level of each page&#10; &quot;talkid&quot;       - The page ID of the talk page for each non-talk page&#10; &quot;subjectid&quot;     - The page ID of the parent page for each talk page">
            <type>
              <t>protection</t>
              <t>talkid</t>
              <t>subjectid</t>
            </type>
          </param>
          <param name="token" multi="" limit="500" description="Request a token to perform a data-modifying action on a page">
            <type>
              <t>edit</t>
              <t>delete</t>
              <t>protect</t>
              <t>move</t>
              <t>block</t>
              <t>unblock</t>
              <t>email</t>
            </type>
          </param>
        </parameters>
      </module>
      <module name="blah" missing="" />
    </querymodules>
  </paraminfo>
</api>

[edit] Mögliche Fehler

Keine.

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox