Difference between revisions of "Template:Dump"
imported>Was a bee |
imported>Was a bee |
||
| Line 1: | Line 1: | ||
| − | <includeonly>{{#invoke: | + | <includeonly>{{#invoke:Sandbox/Was a bee/Dump|Dump |
| + | |id={{#invoke:ResolveEntityId|entityid|{{{id|{{{title|{{SUBJECTPAGENAME}}}}}}}}}} | ||
| + | |1={{{1|}}} | ||
| + | |2={{{2|}}} | ||
| + | |3={{{3|}}} | ||
| + | |4={{{4|}}} | ||
| + | |5={{{5|}}} | ||
| + | |6={{{6|}}} | ||
| + | |7={{{7|}}} | ||
| + | |8={{{8|}}} | ||
| + | |9={{{9|}}} | ||
| + | |10={{{10|}}} | ||
| + | |11={{{11|}}} | ||
| + | |12={{{12|}}} | ||
| + | |13={{{13|}}} | ||
| + | |14={{{14|}}} | ||
| + | |15={{{15|}}} | ||
| + | |16={{{16|}}} | ||
| + | }}</includeonly><noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 19:35, 6 June 2018
| This template uses Lua: |
This is wrapper template which provides easy access to Dump function defined in Module:Wikidata.
Contents
Usage
{{Dump}}
{{Dump|id=Q42}}
{{Dump|title=Douglas Adams}}
{{Dump|title=Douglas Adams|claims|P856|1|mainsnak}}
Function
This template renders raw data of Wikidata item page in JSON-like format (for details, see mw:Wikibase/DataModel/JSON) by using Lua function mw.dumpObject.
| Browser interface for Q42 | Raw data of Q42 |
|---|---|
|
Lua error in Module:Sandbox/Was_a_bee/Dump at line 13: attempt to index field 'wikibase' (a nil value). |
| Wikidata item page interface displayed when accessed by browser. The example item is Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q42). | Raw data of the same item page in JSON-like format (for details, see mw:Wikibase/DataModel/JSON) rendered by the code {{Dump|id=Q42}}. Real JSON format data is accessible through URL https://www.wikidata.org/wiki/Special:EntityData/Q42.json.
|
Whole raw data is very long. So it is useful to render certain part of the whole tree.
Example
- Input
{{Dump|title=Douglas Adams|claims|P856|1|mainsnak}}
- Output
Lua error in Module:Sandbox/Was_a_bee/Dump at line 13: attempt to index field 'wikibase' (a nil value).
Test area
The following data tree is current status of Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (P31) section of Lua error in Module:Wd at line 196: attempt to index field 'wikibase' (a nil value). (Q4115189).
You can check how data is represented through this template, by editing target section at Wikidata. (After editing, Script error: No such module "Purge". to update.)
{{Dump|id=Q4115189|claims|P31|height=400px}}
Lua error in Module:Sandbox/Was_a_bee/Dump at line 13: attempt to index field 'wikibase' (a nil value).
See also
| The above documentation is transcluded from Template:Dump/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |
