« My first external query » : différence entre les versions

De Semantic MediaWiki - Sandbox

(neu)
 
(add)
 
(10 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
; Configuration
<syntaxhighlight lang="php">
$smwgQuerySources = [
'semantic-mw' => [
'SMWExternalAskQueryLookup'
]
];
$seqlgExternalRepositoryEndpoints = [
'semantic-mw' => [
'https://www.semantic-mediawiki.org/w/index.php/$1',
'https://www.semantic-mediawiki.org/w/api.php',
true
]
];
</syntaxhighlight>
; Syntax
<pre>
{{#ask:
{{#ask:
  [[SMWCon Fall 2016]]
  [[Category:City]]
  |?Has planned start#-F[Y-m-d]=start date
[[Population::+]]
  |?Has planned finish#-F[Y-m-d]=end date
  |?=Name
  |source=smworg
  |?Population
  |mainlabel=conference
|?Area
  |headers=plain
|?Average rainy days
  |source=semantic-mw
  |mainlabel=-
  |limit=10
}}
}}
</pre>
; Result
{{#ask:
[[Category:City]]
[[Population::+]]
|?=Name
|?Population
|?Area
|?Average rainy days
|source=semantic-mw
|mainlabel=-
|limit=10
}}
; See also
* [[My second external query]]
[[Category:Semantic External Query Lookup example]]

Dernière version du 12 août 2019 à 12:11

Configuration
$smwgQuerySources = [
	'semantic-mw' => [
		'SMWExternalAskQueryLookup'
		]
	];
$seqlgExternalRepositoryEndpoints = [
	'semantic-mw' => [
		'https://www.semantic-mediawiki.org/w/index.php/$1',
		'https://www.semantic-mediawiki.org/w/api.php',
		true
		]
	];
Syntax
{{#ask:
 [[Category:City]]
 [[Population::+]]
 |?=Name
 |?Population
 |?Area
 |?Average rainy days
 |source=semantic-mw
 |mainlabel=-
 |limit=10
}}
Result
NamePopulationAreaAverage rainy days
Karlsruhe294,761124
See also
Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.