(adding Brad Jorsch) On Thu, Apr 30, 2015 at 11:16 PM, Stephen Niedzielski < [email protected]> wrote:
> A little tangential, and maybe it goes without saying, > It took programming from Brad Jorsch and others, so thanks for noticing! > but I really like that MediaWiki API points to documentation in-band when > fetched via browser (without the format option). For example: > > >> https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&piprop=thumbnail&pithumbsize=96&pilimit=50&generator=prefixsearch&gpssearch=tomato&gpslimit=50 > > > Although a nice improvement would be to link to the specific API used. > Nice idea,I filed T97842 <https://phabricator.wikimedia.org/T97842>. ApiHelp.php code would have to work from the query modules in the URL to the requesting module's help. In this case https://en.wikipedia.org/w/api.php?action=help&modules=query%2Bpageimages Pro tip: you can take any api.php request and load it into Special:ApISandbox by turning the query string into a URL fragment. So take the above and replace /w/api.php? with /wiki/Special:ApiSandbox# , and https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&prop=pageimages&piprop=thumbnail&pithumbsize=96&pilimit=50&generator=prefixsearch&gpssearch=tomato&gpslimit=50 Maybe pretty-printed API results could add a [try in ApiSandbox] link similar to the one I added to the {{ApiEx}} wiki template. I noticed pageimages doesn't show a (read more <https://www.mediawiki.org/wiki/API:Properties#linkshere_.2F_lh>) link to its wiki doc,I filed T97835 <https://phabricator.wikimedia.org/T97835>. Stephen, welcome! FYI I wrote an article about search results and pageimages for the upcoming (or dead-by-reorg :) ) "Data and developer hub", https://www.mediawiki.org/wiki/API:Page_info_in_search_results (Monte, how's the review coming :-) ?). -- =S Page WMF Tech writer
_______________________________________________ Mobile-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mobile-l
