There is no API call that will just return a list of page names with no added junk

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

There is no API call that will just return a list of page names with no added junk

jidanni
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/Registration
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&gapprefix=DebConf18/DayTrip/Registration&gaplimit=22&format=txt"
perl -wnle 'print for m!DebConf18/DayTrip/Registration.+!g;' z
DebConf18/DayTrip/Registration/A
DebConf18/DayTrip/Registration/B
DebConf18/DayTrip/Registration/C

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: There is no API call that will just return a list of page names with no added junk

Gergo Tisza
On Sat, Jun 30, 2018 at 4:44 AM Dan Jacobson <[hidden email]> 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.


DebConf18/DayTrip/Registration/A
DebConf18/DayTrip/Registration/B
DebConf18/DayTrip/Registration/C


_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: There is no API call that will just return a list of page names with no added junk

jidanni
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 mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api