Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 223: | Line 223: | ||
* @property {string} url | * @property {string} url | ||
* @property {string[]} dataSources | * @property {string[]} dataSources | ||
* @property {string[]} businessModel | |||
* @property {string[]} functions | * @property {string[]} functions | ||
* @property {string} logo | * @property {string} logo | ||
Line 303: | Line 304: | ||
const dctResponse = await fetch(getQueryUrl(dctQuery)).then(response => response.json()); | const dctResponse = await fetch(getQueryUrl(dctQuery)).then(response => response.json()); | ||
const dctList = Object.keys(dctResponse.query.results).map(dctName => { | const dctList = Object.keys(dctResponse.query.results).map(dctName => { | ||
const dctResult = dctResponse.query.results[dctName]; | const dctResult = dctResponse.query.results[dctName]; | ||
Line 314: | Line 312: | ||
dct.url = dctResult.fullurl; | dct.url = dctResult.fullurl; | ||
dct.dataSources = dctResult.printouts[DATASRC_PROP].map(source => source.fulltext).sort(); | dct.dataSources = dctResult.printouts[DATASRC_PROP].map(source => source.fulltext).sort(); | ||
dct.businessModel = dctResult.printouts[BUSINESS_PROP].map(bModel => bModel.fulltext); | |||
dct.logo = dctResult.printouts[IMG_PROP][0] ? getFilePath(dctResult.printouts[IMG_PROP][0].fulltext) : undefined; | dct.logo = dctResult.printouts[IMG_PROP][0] ? getFilePath(dctResult.printouts[IMG_PROP][0].fulltext) : undefined; | ||
Line 327: | Line 326: | ||
return dct; | return dct; | ||
}); | }); | ||
console.log(dctList) | |||
return { dcts: dctList, funcData: functionsData }; | return { dcts: dctList, funcData: functionsData }; |
Revision as of 13:36, 8 September 2022
Development verstion of the DCT List.
Not ready for production!