https://bugzilla.wikimedia.org/show_bug.cgi?id=69683

--- Comment #2 from orenbochman <orenboch...@gmail.com> ---
err steps are - write an R library that works with the api using RCurl's
postForm
do login (2step)
get an edit token (1step)
do an edit via:

addNewSection<-function(title="Wikipedia_talk:Sandbox",                   
                        sectiontitle="sectiontitle",
                        summaryText,
                        text="text",
                        editToken,
                        curl)
  {
  #perfom the edit using these parameters
  editPars = list(
    action="edit",
    title=title,
    section="new",          
    sectiontitle=sectiontitle,
    watchlist="preferences",
    summary=summaryText, 
    text=text,
    bot="",
    minor="",
    format="xml",
    token=editToken
    )#add token to request

  x1=postForm(uri=api,.params=editPars,style="httppost",curl=curl) #edit
  #parse the result
  doc=xmlInternalTreeParse(x1, trim = TRUE)
  return(doc)
}

res=addNewSection(title="Wikipedia:Sandbox",
              sectiontitle=paste("WRAP Test ",Sys.time()),
              summaryText="WRAP test edit",
              text="Hello World MW api\n\n",
              editToken=editToken,
              curl=h)

when sectiontitle is blank - summaryText works per the docs - when it is
specified as shown edit summary remains blank.

hope this helps :-)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to