forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
14b2799f08
commit
4add2d1aff
151 changed files with 4561 additions and 3315 deletions
|
@ -119,7 +119,9 @@ export interface WikidataAdvancedSearchoptions extends WikidataSearchoptions {
|
|||
notInstanceOf?: number[]
|
||||
}
|
||||
|
||||
interface SparqlResult {results: { bindings: {item, label, description, num}[] }}
|
||||
interface SparqlResult {
|
||||
results: { bindings: { item; label; description; num }[] }
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility functions around wikidata
|
||||
|
@ -422,7 +424,7 @@ export default class Wikidata {
|
|||
}
|
||||
|
||||
const url = "https://www.wikidata.org/wiki/Special:EntityData/" + id + ".json"
|
||||
const entities = (await Utils.downloadJsonCached<{entities}>(url, 10000)).entities
|
||||
const entities = (await Utils.downloadJsonCached<{ entities }>(url, 10000)).entities
|
||||
const firstKey = <string>Array.from(Object.keys(entities))[0] // Roundabout way to fetch the entity; it might have been a redirect
|
||||
const response = entities[firstKey]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue