Brad Jorsch schreef: > On Thu, Oct 23, 2008 at 06:36:24PM +0100, Jools Smyth wrote: > >> Get page contents and store the timestamp - make some changes to the page. >> when I edit pass my timestamp back to the API. >> >> Is this correct? If so, maybe the documentation would be better to say >> "you also need the timestamp of the revision your edits are based on" ? >> > > What you really need to pass is the timestamp of the last revision of > the page ''at the time you got the edit token for the page'', which > might theoretically be different from the timestamp of the revision your > edits are "based on", depending on how you define "based on". > Actually, using a different timestamp than the last revision's timestamp will fail: the edit conflict check requires that the timestamp are *exactly the same*, so timestamps of earlier revisions *or* later revisions *will* *not* *work*. You really need to get that one timestamp. (I apologize for overusing the * in this paragraph.) > I usually query prop=info|revisions&intoken=edit&rvprop=timestamp|content > to get all three (token, timestamp, and content) in one query; leave out > "|content" if you don't need it, of course. I guess that's the easiest way, but you may not need it if you're adding a new section or replacing the page altogether.
Roan Kattouw (Catrope) _______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
