Closed blackwinter closed 10 years ago
Otherwise cool, but I'd prefer not to break backward compatibility. Could you tweak the XPath to match either? I don't think ReXML supports (@apfrom|@apcontinue)
, since that's XPath 2, but something along the lines of @*[name()='apfrom' or name()='apcontinue']
should do the trick.
I can do that. In that case, however, I'd like to extract the logic that deals with continuing a query into a shared method. There's a lot of duplication and adding more logic doesn't help the fact at all. Would you agree and, if so, should it take place in this pull request or should I open a new one?
Also, backlinks
and contributions
are already continue
-only. Should they be changed, too?
For future reference, MediaWiki API 2.0 is going to introduce a new "continue" syntax. At some point this library probably needs to take differing API capabilities into account.
Sounds good to me, feel free to add to this pull request. And the more fixes the merrier ;)
API 2.0 is most likely to be somebody else's problem...
Finished first pass. Still need to add documentation and do some more testing. Should be ready to push some time tomorrow.
(Turns out that #56 isn't settled yet, though. More on that later.)
Done: b489c94. Please let me know if you have any comments or want me to change anything.
Sweet, that's so much better than before. Thanks a million!
Recent MediaWiki versions (>= 1.19?) don't return
@apfrom
anymore. Instead,@apcontinue
is returned in the response body.This is inherently untestable with FakeMediaWiki and may not work on older MediaWiki versions. But testing against a live instance shows the effect: