Content deleted Content added
m On the Dump function, switching the link to more informative page |
Pointing to Module:ResolveEntityId |
||
Line 18:
Other methods:
* <code>pageId</code>: returns the Wikidata id (Q…) of the current page or nothing if the page is not connected to Wikidata. To get the Wikidata id of another page, use [[Module:ResolveEntityId|<nowiki>{{#invoke:ResolveEntityId|</nowiki>''page''<nowiki>}}</nowiki>]].
* <code>getTAValue</code>: gets the TA98 (Terminologia Anatomica first edition 1998) values for property P1323. It takes no parameters and constructs its output as a list, with each value linked to an external resource. This is an exemplar for writing calls that need to return external links.
* <code>ViewSomething</code>: gets anything in the structured data, including labels, descriptions, references and interwiki links. See [https://en.wikipedia.org/w/index.php?title=Module_talk%3AWikidata&diff=652812891&oldid=650633541#Is_it_possible_to_get_value.28s.29_in_structured_tree_by_this_Module.3F]
* <code>getSiteLink</code>: gets name of a page in given in argument wiki (like "enwikiquote" for English Wikiquote, "arwiki" for the Arabic Wikipedia).
* <code>Dump</code>: <code><nowiki>{{#invoke:Wikidata|Dump|claims}}</nowiki></code> spies the structured data. It uses the same arguments as ViewSomething. Try this with preview only to see results. That helps you a lot in developing Lua scripts that access the data. If used without arguments, it dumps everything including labels, descriptions, references and interwiki links. There is the wrapper template, see {{tl|Dump}}.
* <code>getImageLegend</code>: returns an image legend (image is property P18; image legend is property P2096).
|