Last modified: 2011-10-29 16:40:00 UTC
With mw.user.tokens.get( 'editToken' ) it is possible to get the edit token without calling the API. But to detect conflicts you should set starttimestamp to the time when you obtained the edit token ([[mw:API:Edit]]). So this timestamp should be retrievable as easily as the tokens, perhaps as mw.user.tokens.get( 'timestamp' ).
That documentation page probably isn't worded very well. starttimestamp should be set to the timestamp when you obtained the page content for the user to edit. It's used to detect whether the page was deleted or recreated in the meantime. I've reworded the documentation page.
And why is there a value 'starttimestamp', when getting tokens with prop=info? Is that not a timestamp to give back into action=edit? Instead the client should create an own timetamp in UTC of the current time and give that into action=edit?
(In reply to comment #2) > And why is there a value 'starttimestamp', when getting tokens with prop=info? > Is that not a timestamp to give back into action=edit? Instead the client > should create an own timetamp in UTC of the current time and give that into > action=edit? I believe that's there for convenience and that it's essentially the server time.
Please rephrase also the help text in ApiEditPage.php: starttimestamp - Timestamp when you obtained the edit token. Used to detect edit conflicts; leave unset to ignore conflicts Thanks.