Widget: DCTList: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Eschmidt (talk | contribs)
No edit summary
Eschmidt (talk | contribs)
No edit summary
Line 293: Line 293:
             const DATASRC_PROP = 'Data Sources';
             const DATASRC_PROP = 'Data Sources';
             const IMG_PROP = 'Image';
             const IMG_PROP = 'Image';
            const BUSINESS_PROP = 'Business model';
             const dctQuery = '[[Category:Disaster Community Technology]]'
             const dctQuery = '[[Category:Disaster Community Technology]]'
                           + '[[Is Archived::No]]'
                           + '[[Is Archived::No]]'
Line 298: Line 299:
                           + '|?' + IMG_PROP
                           + '|?' + IMG_PROP
                           + '|?' + DATASRC_PROP
                           + '|?' + DATASRC_PROP
                          + '|?' + BUSINESS_PROP
                           + '|?' + allFunctions.join('|?');
                           + '|?' + allFunctions.join('|?');


             const dctResponse = await fetch(getQueryUrl(dctQuery)).then(response => response.json());
             const dctResponse = await fetch(getQueryUrl(dctQuery)).then(response => response.json());
                console.log(dctResponse)
             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];

Revision as of 13:12, 8 September 2022

Development verstion of the DCT List.
Not ready for production!