API:Edit - Talk

Talk
Talk action allows to add a comment to a discussion page associated with an article or a user page. Discussion pages are actual articles, but saved with a concrete namespace:
 * ns=1 for Talk
 * ns=3 for User talk
 * ns=5 for Wikipedia talk
 * ns=7 for Image talk
 * ns=9 for MediaWiki talk
 * ns=11 for Template talk
 * ns=13 for Help talk
 * ns=15 for Category talk
 * ns=101 for Portal talk

Complete list of namespaces can be obtained at: |namespaces http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=general|namespaces 

As in the previous operations, most parameters are passed via POST. It is important to remark that talk action is a two-steps operation, as edit action. That is, it is necessary to execute an action=query to obtain previously the talktoken, essential to perform commit operations on the database, associated with the execution of the method save of ApiEdit.php.

Sample request and response:

NOTE: DRAFT FORMAT, SUBJECT TO CHANGES DURING DEVELOPMENT

Request: In a previous step: http://en.wikipedia.org/w/api.php?action=query&prop=info&titles=Talk::Zaragoza&intoken=edit

Response:  

Request: api.php ? action=talk & tatitle=”Talk::Title_Article” Post parameters: tatype=talk/user/category/mediawiki/help [ tasection = yes/no ] taedittoken = abc123		  Obtained from the previous query action. tasummary = talkSummary         Summary of changes tatext = WikiText		  Article content [ lgtoken = 123abc ]		  ''Token identifying the user editing the article. For non-anonymous users.'' [ minoredit = yes/no ]	  Optional check-box indicating minor changes. [ disablemerge = yes/no ]	  Optional check-box indicating merge is disabled [ testrun = yes/no ]		  Optional check-box [ tauserid = userId ]           Parameter identifying the logged user uploading the file [ taedittime = Revision time ]  ''Time indicating the moment when a revision is going to be editted. It is used to verify an'' ''article has been modified meanwhile other user was editing it. In that case, the server'' will try to merge the contents. Response: result: Success		 Other values: UserNotLogged, UserBlocked, ReadOnlyArticle,UserConfirmEmail, NoCreatePermission, ReadOnlyMode, Prohibited, DbLocked title:”Talk::Main Page”	 Normalized title id: 12345			 On success, the ID of the page revid: 6789			 On success, the new latest revision id content=”wikiText”		 When used with testrun, this field will be set to the merge result