API talk:Raw query continue

Logic Problem or MediaWiki Bug?
I rather suspect the first, but if so, is it on my end or in the logic presented on the page? According to the logic on this page as I understand it, when I hit the generator's continue, I send the following and get the result below it:

http://www.mediawiki.org/w/api.php ? action=query & titles=API:Main%20page & generator=categories & prop=categories|links & gcllimit=2 & cllimit=1 & gclcontinue= 14588|MediaWiki_API_Overview & format=json {  "query-continue": { "links": { "plcontinue": "12565|14|MediaWiki_Development/ca" },    "categories": { "gclcontinue": " 14588|New_contributors ", "clcontinue": "67186|MediaWiki_API" }  }   (...) }

Great, looks good so far. Then, I ask for the next block:

http://www.mediawiki.org/w/api.php ? action=query & titles=API:Main%20page & generator=categories & prop=categories|links & gcllimit=2 & cllimit=1 & plcontinue=12565|14|MediaWiki_Development/ca & clcontinue=67186|MediaWiki_API & format=json {  "query-continue": { "categories": { "gclcontinue": " 14588|MediaWiki_API_Overview " }  }   (...) }

I trust the infinite loop is clear. :) – RobinHood70 talk 07:50, 14 January 2014 (UTC)


 * Never mind, I got it figured out. You have to keep emitting the same gclcontinue once you've first emitted it. That's not clear from the page; I'll go clarify it. – RobinHood70 talk 08:13, 14 January 2014 (UTC)
 * Thanks for the clarification. I suggest you switch to the new continue model, as it handles these issues automatically, and makes the client code much shorter and cleaner. --Yurik (talk) 08:29, 14 January 2014 (UTC)
 * A bit of a late reply, but... I wish I could! I'm writing a general purpose bot, so I can't assume that the new continue model will always be available. There are plenty of wikis still out there running on versions less than 1.21. – RobinHood70 talk 01:56, 19 May 2014 (UTC)
 * In that case i would recommend implementing the bot that supports the latest version, and doing a local simulation of that functionality. --Yurik (talk) 02:07, 19 May 2014 (UTC)