Skip to content

Commit

Permalink
Merge pull request #6 from lingua-libre/hugolpz-patch-1
Browse files Browse the repository at this point in the history
Add Dictionnaire des Francophones
  • Loading branch information
hugolpz committed Mar 23, 2023
2 parents edb5b36 + 4055c7d commit 8879ed5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/ext.queryViz.QueryViz.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@
console.log('SPARQL query service: Commons');
customEndpoint = 'https://commons-query.wikimedia.org/sparql';
break;
case query.includes('#defaultEndpoint:Francophones'):
console.log('SPARQL query service: Dictionnaire des Francophones');
customEndpoint = 'https://www.dictionnairedesfrancophones.org/api/sparql';
break;
case query.includes('#defaultEndpoint:Lingualibre'):
console.log('SPARQL query service: Lingualibre');
customEndpoint = 'https://lingualibre.org/bigdata/namespace/wdq/sparql';
Expand All @@ -228,7 +232,7 @@
break;
}
// Adapts to each service's xhr protocol : post vs get
if (customEndpoint.includes('lingualibre')) {
if (customEndpoint.includes('lingualibre') || customEndpoint.includes('francophones') ) {
return $.post(customEndpoint, { format: 'json', query: query });
} else {
return $.get(customEndpoint, { format: 'json', query: query });
Expand Down

0 comments on commit 8879ed5

Please sign in to comment.