Pomoc API MediaWiki

To jest automatycznie wygenerowana strona dokumentacji API MediaWiki.

Dokumentacja i przykłady: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=wbformatvalue

(main | wbformatvalue)
  • Ten moduł wymaga praw odczytu.
  • Źródło: WikibaseClient
  • Licencja: GPL-2.0-or-later

Formats DataValues.

Parametry:
Other general parameters are available.
generate

The desired output format to generate.

Jedna z następujących wartości: text/html, text/html; disposition=verbose, text/html; disposition=verbose-preview, text/plain, text/x-wiki
Domyślnie: text/x-wiki
datavalue

The data to format. This has to be the JSON serialization of a DataValue object.

Ten parametr jest wymagany.
datatype

The value's data type. This is distinct from the value's type

Jedna z następujących wartości: commonsMedia, external-id, geo-shape, globe-coordinate, math, monolingualtext, quantity, string, tabular-data, time, url, wikibase-item, wikibase-property
property

Property ID the data value belongs to, should be used instead of the datatype parameter.

options

The options the formatter should use. Provided as a JSON object.

The supported options are:

lang
The language in which the value should be formatted (a MediaWiki language code).
applyRounding
Whether to apply rounding to the number. Can be a boolean (automatic / no rounding) or an integer (exponent of the last significant decimal digits). Only useful for quantity values.
applyUnit
Whether to include the unit in the output (a boolean). Only useful for quantity values.
showcalendar
Whether to show the calendar model. Can be a boolean (always / never show) or the string "auto" (automatically determine whether to show). Only useful for time values.