It would be good to have a backend way that lists all Z4/Types in the wiki.
Ideally, together with the labels in a given language.
Potentially make Z4 a parameter of this API, so that we can call for other types too?
It would be good to have a backend way that lists all Z4/Types in the wiki.
Ideally, together with the labels in a given language.
Potentially make Z4 a parameter of this API, so that we can call for other types too?
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Modify query API to include type as an option | mediawiki/extensions/WikiLambda | master | +104 -41 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Gabrielchl | T266267 Prefill keys when adding an object | |||
Resolved | ArthurPSmith | T264828 Get list of types and their keys from wiki, including labels in requested language | |||
Resolved | ArthurPSmith | T266237 Backend to provide all types (Z4s) defined on the wiki |
So having worked on an autocomplete interaction for the reference type, it seems to me that API (list=wikilambda_searchlabels within the mediawiki query API) could be usefully extended to restrict search results by type; with no query string that could return all ZObjects (up to a limit) of a given type. It already returns id, label combinations for a given language. With type = Z4 that would satisfy this ticket...
Although actually trying to do this, it appears the types listed in the table are not the ZObject id's, but string values - so instead of Z4 you have to query for "ZType". Hmm. That doesn't seem like the right choice long term but I guess we can work with it for now.
Change 647249 had a related patch set uploaded (by Jforrester; owner: ArthurPSmith):
[mediawiki/extensions/WikiLambda@master] Modify query API to include type as an option
Change 647249 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] Modify query API to include type as an option
This is great, thank you. (Note that wikis will need to purge or null-edit all pages for this to take effect.)