lookup/wikidata#

Variables#

CROSS_REFERENCE_PROPERTIES#

const CROSS_REFERENCE_PROPERTIES: readonly string[]

Defined in: editor/src/lookup/wikidata.ts:39

The properties read as cross-references, in this order: VIAF, GND, MusicBrainz work, recording, release, release group and artist, YouTube video, IMSLP. A property’s thing is the catalogue thing whose scheme_uri is the property’s entity IRI.


WIKIDATA_SERVICE#

const WIKIDATA_SERVICE: "https://www.wikidata.org/w/api.php" = "https://www.wikidata.org/w/api.php"

Defined in: editor/src/lookup/wikidata.ts:28

The Action API, also the service of every Wikidata candidate.

Functions#

commonsThumbnail()#

commonsThumbnail(name): string

Defined in: editor/src/lookup/wikidata.ts:91

The thumbnail URL of a Commons file, as wide as a search asks thumbnails.

Parameters#

name#

string

Returns#

string


entityUrl()#

entityUrl(id, language): string

Defined in: editor/src/lookup/wikidata.ts:78

The URL that reads item id’s labels, descriptions and statements.

Parameters#

id#

string

language#

string

Returns#

string


resolveWikidata()#

resolveWikidata(context, iri, signal?): Promise<Candidate | null>

Defined in: editor/src/lookup/wikidata.ts:207

The item an IRI names, with its cross-references and its image; null for an IRI that names no Wikidata item or for an item Wikidata lacks.

Parameters#

context#

LookupContext

iri#

string

signal?#

AbortSignal

Returns#

Promise<Candidate | null>


searchUrl()#

searchUrl(text, kind, language): string

Defined in: editor/src/lookup/wikidata.ts:58

The URL that searches Wikidata for text among the things of kind.

Parameters#

text#

string

kind#

ValueKind

language#

string

Returns#

string


searchWikidata()#

searchWikidata(context, kind, text, signal?): Promise<readonly Candidate[]>

Defined in: editor/src/lookup/wikidata.ts:134

The items of kind Wikidata finds for text, in the search’s order. Blank text answers no candidate without a request.

Parameters#

context#

LookupContext

kind#

ValueKind

text#

string

signal?#

AbortSignal

Returns#

Promise<readonly Candidate[]>