There is no API call that will just return a list of page names DebConf18/DayTrip/Registration/A DebConf18/DayTrip/Registration/B DebConf18/DayTrip/Registration/C like one sees in https://wiki.debconf.org/wiki/Special:PrefixIndex/DebConf18/DayTrip/Registra... without insisting on adding pageid="7823" ns="0" to the result even if one uses prop=info & ininfo=... nor just printing it in the above plain text format without any other junk added, even if one uses format=txt. The best one can do is wget -O z "https://wiki.debconf.org/api.php?action=query&generator=allpages&gap..." perl -wnle 'print for m!DebConf18/DayTrip/Registration.+!g;' z DebConf18/DayTrip/Registration/A DebConf18/DayTrip/Registration/B DebConf18/DayTrip/Registration/C
On Sat, Jun 30, 2018 at 4:44 AM Dan Jacobson jidanni@jidanni.org wrote:
There is no API call that will just return a list of page names DebConf18/DayTrip/Registration/A DebConf18/DayTrip/Registration/B DebConf18/DayTrip/Registration/C
Indeed not, that's not what APIs are for. Use a tool like jq or xpath, or one of the many client libraries out there.
$ curl -s ' https://wiki.debconf.org/api.php?action=query&generator=allpages&gap...' | jq --raw-output '.query.pages[].title'
DebConf18/DayTrip/Registration/A DebConf18/DayTrip/Registration/B DebConf18/DayTrip/Registration/C
Well if the API insists on returning three times more data columns than the user requested, all I can say is it is unnecessarily burdening itself, the network, and the requester. Most other APIs don't do that.
mediawiki-api@lists.wikimedia.org