Changes between Version 37 and Version 38 of XmlRpcPlugin


Ignore:
Timestamp:
Jun 12, 2006, 5:40:48 AM (9 years ago)
Author:
athomas
Comment:

Updated examples

Legend:

Unmodified
Added
Removed
Modified
  • XmlRpcPlugin

    v37 v38  
    7979import xmlrpclib
    8080
    81 server = xmlrpclib.ServerProxy("http://athomas:password@localhost/trac-dev/login/xmlrpc")
    82 methods = server.system.listMethods()
    83 method_help = server.system.multicall([{'methodName': 'system.methodHelp', 'params': [method]} for method in methods])
    84 for help in method_help:
    85     lines  = help.splitlines()
     81server = xmlrpclib.ServerProxy("http://athomas:password@localhost/trac/devel/login/xmlrpc")
     82
     83multicall = xmlrpclib.MultiCall(server)
     84for method in server.system.listMethods():
     85    multicall.system.methodHelp(method)
     86
     87for help in multicall():
     88    lines = help.splitlines()
    8689    print lines[0]
    8790    print '\n'.join(['  ' + x for x in lines[2:]])
    8891    print
     92
    8993}}}
    9094
     
    96100import xmlrpclib
    97101
    98 server = xmlrpclib.ServerProxy("http://athomas:password@localhost/trac-dev/login/xmlrpc")
    99 tickets = server.ticket.query("owner=athomas")
    100 print '\n'.join(map(str, server.system.multicall([{'methodName' : 'ticket.get', 'params' : [ticket]} for ticket in tickets])))
     102server = xmlrpclib.ServerProxy("http://athomas:password@localhost/trac/devel/login/xmlrpc")
     103
     104multicall = xmlrpclib.MultiCall(server)
     105for ticket in server.ticket.query("owner=athomas"):
     106    multicall.ticket.get(ticket)
     107print map(str, multicall())
    101108}}}
    102109