Changes between Version 26 and Version 27 of XmlRpcPlugin


Ignore:
Timestamp:
Jan 19, 2006, 5:18:31 PM (9 years ago)
Author:
mgood
Comment:

add example usage of WikiRPC

Legend:

Unmodified
Added
Removed
Modified
  • XmlRpcPlugin

    v26 v27  
    9393}}}
    9494
     95Access the Wiki with [http://www.jspwiki.org/Wiki.jsp?page=WikiRPCInterface2 WikiRPC]
     96{{{
     97#!python
     98import xmlrpclib
     99
     100server = xmlrpclib.ServerProxy("http://athomas:password@localhost/trac-dev/login/xmlrpc")
     101
     102# print the content of WikiStart
     103print server.wiki.getPage("WikiStart")
     104
     105# print WikiStart as HTML
     106print server.wiki.getPageHTML("WikiStart")
     107
     108# write to the SandBox page from a text file
     109sandbox_content = file("sandbox.txt").read()
     110server.wiki.putPage("SandBox", sandbox_content, {"comments": "testing the WikiRPC interface"})
     111}}}
     112
     113
    95114=== API Usage ===
    96115