Jump to content

User talk:Roan Kattouw (WMF)/Archive 1

From mediawiki.org
Latest comment: 9 years ago by DannyH (WMF) in topic A message for the world

A message for the world

Hello DannyH (WMF) (talk) 23:52, 7 July 2015 (UTC)

again DannyH (WMF) (talk) 23:53, 7 July 2015 (UTC)

API for special pages

Hi!

Can the API get page content from special pages, like Special:NewPages? I tried this and it says "Namespace doesn't allow actual pages" which is clear enough, but is there any way to get around that? I have looked at the API documentation here but I couldn't find anything that says anything about special pages. Nirmos (talk) 21:54, 6 June 2015 (UTC)

@Nirmos: There are a few pages that do work using the querypage module, but Newpages isn't one of them. For some special pages, there are API module equivalents, like allpages for Special:Allpages. But I don't think Newpages has one of those either. --Roan Kattouw (WMF) (talk) 18:01, 8 June 2015 (UTC)
Thank you! I solved it by transcluding the special page here and then have the script get that page's content. Nirmos (talk) 12:23, 9 June 2015 (UTC)

Does the API support diffs? Nirmos (talk) 15:19, 10 June 2015 (UTC)

Yes, see the rvdiffto and rvdifftotext parameters to action=query&prop=revisions. --Roan Kattouw (WMF) (talk) 16:09, 10 June 2015 (UTC)
Thank you very much! Nirmos (talk) 20:37, 11 June 2015 (UTC)