Module:Authority control/doc

Usage
This module is used by the template authority control to access authority control data from Wikidata.

Step one — formatting function
Add a new function to the module with the following format: function fooLink( id ) return '[http://bar.com/baz' .. id .. ' ' .. id .. ']' .. getCatForId( 'FOO' ) end Where:
 * is the name of the function, which will be used in step two. It won't affect the performance of this module but the naming scheme for these functions is a camel case concatenation of the name of the authority control and the work "Link".
 * is the URL of the authority control website (if it has one) up to the point of the ID number. This format assumes that the URL ends with the ID number.  If not the case, the remaining URL should be added after the first "id"; i.e. at the   in ' .. id .. 'foo ' .. id .. ']'
 * is the name of the parameter used if automatic categories are to be added (currently this is only used in the User namespace). The naming scheme uses the name of the authority control in uppercase.

Step two — list
In the list under the title "List of displayed authority control IDs", add a new line in the following format: { 'FOO', 'BAZ', nnn, fooLink }, Where:
 * is the name of the parameter used for manual input via the template. The naming scheme uses the name of the authority control in uppercase.
 * is the page name of a page on Wikipedia corresponding to this authority control, to explain it to a curious user.
 * is the visible text displayed before the ID number in the authority control template. It will often be the same as.
 * The whole  element is just the wikilink text that precedes the ID number in the authority control template; it can be replaced with text that would normally work as wikitext.  If there is no page to which to link on Wikipedia, the entire element can be replaced with just.
 * is the number of the corresponding property on wikidata. For example, "VIAF identifier" on Wikidata is P214, in which case the number   should be entered here.
 * is the name of the function that formats the link. It should match the name used in step one.

WorldCat
The WorldCat link can be generated in different ways. The manual parameter  overrides everything else. If that has not been used, a single link will be automatically generated if any of the following are present, in order of precedence: LCCN (library of Congress authority file number), VIAF, or OCLC. The latter would be a reference number to a work rather than an author. If none of the above is available, either through manual entry or held on Wikidata, no WorldCat link will be generated.

Wikisource links

 * Authority control
 * authority control

Wikidata links

 * List of generic properties, lists the authority control properties on Wikidata.
 * List of works properties, lists other similar properties specific to works.
 * Wikidata:Wikidata:Property proposal/Authority control, lists the proposed (but not yet available) authority control properties on Wikidata.