input/wikidata

Methods

(protected, inner) fetchWikidataType(value) → {String}

Get CSL type from Wikidata type (P31)

Source:
Parameters:
Name Type Description
value String

Input P31 Wikidata ID

Returns:
Type:
String

Output CSL type

(protected, inner) parseWikidata(data) → {Object}

Get Wikidata JSON from Wikidata IDs

Source:
Parameters:
Name Type Description
data String

Wikidata IDs

Returns:
Type:
Object

Wikidata JSON

(protected, inner) parseWikidataJSON(data) → {Array.<CSL>}

Format Wikidata data

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Array.<CSL>

The formatted input data

(protected, inner) parseWikidataJSONAsync(data) → {Promise.<Array.<CSL>>}

Format Wikidata data (async)

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Promise.<Array.<CSL>>

The formatted input data

(protected, inner) parseWikidataProp(name, valueopt, langopt) → {Array.<String>|String}

Transform property and value from Wikidata format to CSL.

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Attributes Description
name String

Property name

value String | Number <optional>

Value

lang String <optional>

Language

Returns:
Type:
Array.<String> | String

Array with new prop and value or just the prop when function is called without value

(protected, inner) parseWikidataPropAsync(prop, value, lang) → {Promise.<Array.<String>>}

Transform property and value from Wikidata format to CSL (async).

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Description
prop String

Property

value String | Number

Value

lang String

Language

Returns:
Type:
Promise.<Array.<String>>

Array with new prop and value

Methods

(protected, inner) fetchWikidataType(value) → {String}

Get CSL type from Wikidata type (P31)

Source:
Parameters:
Name Type Description
value String

Input P31 Wikidata ID

Returns:
Type:
String

Output CSL type

(protected, inner) parseWikidata(data) → {Object}

Get Wikidata JSON from Wikidata IDs

Source:
Parameters:
Name Type Description
data String

Wikidata IDs

Returns:
Type:
Object

Wikidata JSON

(protected, inner) parseWikidataJSON(data) → {Array.<CSL>}

Format Wikidata data

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Array.<CSL>

The formatted input data

(protected, inner) parseWikidataJSONAsync(data) → {Promise.<Array.<CSL>>}

Format Wikidata data (async)

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Promise.<Array.<CSL>>

The formatted input data

(protected, inner) parseWikidataProp(name, valueopt, langopt) → {Array.<String>|String}

Transform property and value from Wikidata format to CSL.

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Attributes Description
name String

Property name

value String | Number <optional>

Value

lang String <optional>

Language

Returns:
Type:
Array.<String> | String

Array with new prop and value or just the prop when function is called without value

(protected, inner) parseWikidataPropAsync(prop, value, lang) → {Promise.<Array.<String>>}

Transform property and value from Wikidata format to CSL (async).

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Description
prop String

Property

value String | Number

Value

lang String

Language

Returns:
Type:
Promise.<Array.<String>>

Array with new prop and value

Methods

(protected, inner) fetchWikidataType(value) → {String}

Get CSL type from Wikidata type (P31)

Source:
Parameters:
Name Type Description
value String

Input P31 Wikidata ID

Returns:
Type:
String

Output CSL type

(protected, inner) parseWikidata(data) → {Object}

Get Wikidata JSON from Wikidata IDs

Source:
Parameters:
Name Type Description
data String

Wikidata IDs

Returns:
Type:
Object

Wikidata JSON

(protected, inner) parseWikidataJSON(data) → {Array.<CSL>}

Format Wikidata data

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Array.<CSL>

The formatted input data

(protected, inner) parseWikidataJSONAsync(data) → {Promise.<Array.<CSL>>}

Format Wikidata data (async)

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Promise.<Array.<CSL>>

The formatted input data

(protected, inner) parseWikidataProp(name, valueopt, langopt) → {Array.<String>|String}

Transform property and value from Wikidata format to CSL.

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Attributes Description
name String

Property name

value String | Number <optional>

Value

lang String <optional>

Language

Returns:
Type:
Array.<String> | String

Array with new prop and value or just the prop when function is called without value

(protected, inner) parseWikidataPropAsync(prop, value, lang) → {Promise.<Array.<String>>}

Transform property and value from Wikidata format to CSL (async).

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Description
prop String

Property

value String | Number

Value

lang String

Language

Returns:
Type:
Promise.<Array.<String>>

Array with new prop and value

Methods

(protected, inner) fetchWikidataType(value) → {String}

Get CSL type from Wikidata type (P31)

Source:
Parameters:
Name Type Description
value String

Input P31 Wikidata ID

Returns:
Type:
String

Output CSL type

(protected, inner) parseWikidata(data) → {Object}

Get Wikidata JSON from Wikidata IDs

Source:
Parameters:
Name Type Description
data String

Wikidata IDs

Returns:
Type:
Object

Wikidata JSON

(protected, inner) parseWikidataJSON(data) → {Array.<CSL>}

Format Wikidata data

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Array.<CSL>

The formatted input data

(protected, inner) parseWikidataJSONAsync(data) → {Promise.<Array.<CSL>>}

Format Wikidata data (async)

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Promise.<Array.<CSL>>

The formatted input data

(protected, inner) parseWikidataProp(name, valueopt, langopt) → {Array.<String>|String}

Transform property and value from Wikidata format to CSL.

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Attributes Description
name String

Property name

value String | Number <optional>

Value

lang String <optional>

Language

Returns:
Type:
Array.<String> | String

Array with new prop and value or just the prop when function is called without value

(protected, inner) parseWikidataPropAsync(prop, value, lang) → {Promise.<Array.<String>>}

Transform property and value from Wikidata format to CSL (async).

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Description
prop String

Property

value String | Number

Value

lang String

Language

Returns:
Type:
Promise.<Array.<String>>

Array with new prop and value

Methods

(protected, inner) fetchWikidataType(value) → {String}

Get CSL type from Wikidata type (P31)

Source:
Parameters:
Name Type Description
value String

Input P31 Wikidata ID

Returns:
Type:
String

Output CSL type

(protected, inner) parseWikidata(data) → {Object}

Get Wikidata JSON from Wikidata IDs

Source:
Parameters:
Name Type Description
data String

Wikidata IDs

Returns:
Type:
Object

Wikidata JSON

(protected, inner) parseWikidataJSON(data) → {Array.<CSL>}

Format Wikidata data

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Array.<CSL>

The formatted input data

(protected, inner) parseWikidataJSONAsync(data) → {Promise.<Array.<CSL>>}

Format Wikidata data (async)

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Promise.<Array.<CSL>>

The formatted input data

(protected, inner) parseWikidataProp(name, valueopt, langopt) → {Array.<String>|String}

Transform property and value from Wikidata format to CSL.

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Attributes Description
name String

Property name

value String | Number <optional>

Value

lang String <optional>

Language

Returns:
Type:
Array.<String> | String

Array with new prop and value or just the prop when function is called without value

(protected, inner) parseWikidataPropAsync(prop, value, lang) → {Promise.<Array.<String>>}

Transform property and value from Wikidata format to CSL (async).

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Description
prop String

Property

value String | Number

Value

lang String

Language

Returns:
Type:
Promise.<Array.<String>>

Array with new prop and value

Methods

(protected, inner) fetchWikidataType(value) → {String}

Get CSL type from Wikidata type (P31)

Source:
Parameters:
Name Type Description
value String

Input P31 Wikidata ID

Returns:
Type:
String

Output CSL type

(protected, inner) parseWikidata(data) → {Object}

Get Wikidata JSON from Wikidata IDs

Source:
Parameters:
Name Type Description
data String

Wikidata IDs

Returns:
Type:
Object

Wikidata JSON

(protected, inner) parseWikidataJSON(data) → {Array.<CSL>}

Format Wikidata data

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Array.<CSL>

The formatted input data

(protected, inner) parseWikidataJSONAsync(data) → {Promise.<Array.<CSL>>}

Format Wikidata data (async)

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Promise.<Array.<CSL>>

The formatted input data

(protected, inner) parseWikidataProp(name, valueopt, langopt) → {Array.<String>|String}

Transform property and value from Wikidata format to CSL.

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Attributes Description
name String

Property name

value String | Number <optional>

Value

lang String <optional>

Language

Returns:
Type:
Array.<String> | String

Array with new prop and value or just the prop when function is called without value

(protected, inner) parseWikidataPropAsync(prop, value, lang) → {Promise.<Array.<String>>}

Transform property and value from Wikidata format to CSL (async).

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Description
prop String

Property

value String | Number

Value

lang String

Language

Returns:
Type:
Promise.<Array.<String>>

Array with new prop and value

Methods

(protected, inner) fetchWikidataType(value) → {String}

Get CSL type from Wikidata type (P31)

Source:
Parameters:
Name Type Description
value String

Input P31 Wikidata ID

Returns:
Type:
String

Output CSL type

(protected, inner) parseWikidata(data) → {Object}

Get Wikidata JSON from Wikidata IDs

Source:
Parameters:
Name Type Description
data String

Wikidata IDs

Returns:
Type:
Object

Wikidata JSON

(protected, inner) parseWikidataJSON(data) → {Array.<CSL>}

Format Wikidata data

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Array.<CSL>

The formatted input data

(protected, inner) parseWikidataJSONAsync(data) → {Promise.<Array.<CSL>>}

Format Wikidata data (async)

Source:
Parameters:
Name Type Description
data Object

The input data

Returns:
Type:
Promise.<Array.<CSL>>

The formatted input data

(protected, inner) parseWikidataProp(name, valueopt, langopt) → {Array.<String>|String}

Transform property and value from Wikidata format to CSL.

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Attributes Description
name String

Property name

value String | Number <optional>

Value

lang String <optional>

Language

Returns:
Type:
Array.<String> | String

Array with new prop and value or just the prop when function is called without value

(protected, inner) parseWikidataPropAsync(prop, value, lang) → {Promise.<Array.<String>>}

Transform property and value from Wikidata format to CSL (async).

Returns additional _ordinal property on authors.

Source:
Parameters:
Name Type Description
prop String

Property

value String | Number

Value

lang String

Language

Returns:
Type:
Promise.<Array.<String>>

Array with new prop and value