Pomoc MediaWiki API
To jest automatycznie wygenerowana strona dokumentacji MediaWiki API.
Dokumentacja i przykłady: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_pag
action=wbgetclaims
(main | wbgetclaims)
- Ten moduł wymaga praw odczytu.
- Źródło: WikibaseClient
- Licencja: GPL-2.0-or-later
Pobiera stwierdzenia Wikibase.
Parametry:
- entity
ID of the entity from which to obtain claims. Required unless claim GUID is provided.
- property
Optional filter to only return claims with a main snak that has the specified property.
- claim
A GUID identifying the claim. Required unless entity is provided. The GUID is the globally unique identifier for a claim, e.g. "q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F".
- rank
Optional filter to return only the claims that have the specified rank
- Jedna z następujących wartości: deprecated, normal, preferred
- props
Some parts of the claim are returned optionally. This parameter controls which ones are returned.
- Wartości (oddziel za pomocą | lub alternatywy): references
- Default: references
Przykłady:
- Get claims for item with ID Q42
- api.php?action=wbgetclaims&entity=Q42 [otwórz w brudnopisie]
- Get claims for item with ID Q42 and property with ID P31
- api.php?action=wbgetclaims&entity=Q42&property=P31 [otwórz w brudnopisie]
- Get claims for item with ID Q42 that are ranked as normal
- api.php?action=wbgetclaims&entity=Q42&rank=normal [otwórz w brudnopisie]
- Get claim with GUID of Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F
- api.php?action=wbgetclaims&claim=Q42$D8404CDA-25E4-4334-AF13-A3290BCD9C0F [otwórz w brudnopisie]