Pomoc MediaWiki API
To jest automatycznie wygenerowana strona dokumentacji MediaWiki API. Dokumentacja i przykłady: https://www.mediawiki.org/wiki/API
prop=categories (cl)
- Ten moduł wymaga praw odczytu.
- Ten moduł może być użyty jako generator.
List all categories the pages belong to.
Parametry:
- clprop
Which additional properties to get for each category:
- sortkey
- Adds the sortkey (hexadecimal string) and sortkey prefix (human-readable part) for the category.
- timestamp
- Adds timestamp of when the category was added.
- hidden
- Tags categories that are hidden with __HIDDENCAT__.
- Wartości (oddziel za pomocą |): sortkey, timestamp, hidden
- clshow
Which kind of categories to show.
- Wartości (oddziel za pomocą |): hidden, !hidden
- cllimit
How many categories to return.
- Nie więcej niż 500 (5000 dla botów) dozwolone.
- Domyślnie: 10
- clcontinue
When more results are available, use this to continue.
- clcategories
Only list these categories. Useful for checking whether a certain page is in a certain category.
- Oddziel wartości za pomocą |. Maksymalna ilość wartości to 50 (500 dla botów).
- cldir
The direction in which to list.
- Jedna wartość: ascending, descending
- Domyślnie: ascending
Przykłady:
- Get a list of categories the page Albert Einstein belongs to.
- api.php?action=query&prop=categories&titles=Albert%20Einstein
- Get information about all categories used in the page Albert Einstein.
- api.php?action=query&generator=categories&titles=Albert%20Einstein&prop=info