Changes between Initial Version and Version 1 of XmlRpcPlugin


Ignore:
Timestamp:
Dec 21, 2005, 4:14:55 AM (18 years ago)
Author:
Alec Thomas
Comment:

New hack XmlRpcPlugin, created by athomas

Legend:

Unmodified
Added
Removed
Modified
  • XmlRpcPlugin

    v1 v1  
     1= Trac XML-RPC Plugin =
     2
     3== Description ==
     4
     5This plugin allows Trac to export select parts of its interface via XML-RPC.
     6
     7It also includes some exported functions for manipulating tickets, with plans to include functions for other parts of Tracs API.
     8
     9'' '''Note:''' Unfortunately, due to some issues with mod_pythons !FieldStorage emultation layer, this plugin requires the patch in [trac-ticket:2509 #T2509] to be applied to your Trac installation.''''
     10
     11== Bugs/Feature Requests ==
     12
     13Existing bugs and feature requests for XmlRpcPlugin are
     14[report:9?COMPONENT=XmlRpcPlugin here].
     15
     16If you have any issues, create a
     17[http://trac-hacks.swapoff.org/newticket?component=XmlRpcPlugin&owner=athomas new ticket].
     18
     19== Download ==
     20
     21Download the zipped source from [download:xmlrpcplugin here].
     22
     23== Source ==
     24
     25You can check out the source for XmlRpcPlugin from Subversion at http://trac-hacks.swapoff.org/svn/xmlrpcplugin.
     26
     27== Example ==
     28
     29=== End-User Usage ===
     30Obtain a list of XML-RPC exported functions available to my user:
     31
     32{{{
     33#!python
     34import xmlrpclib
     35
     36server = xmlrpclib.ServerProxy("http://athomas:password@localhost/trac-dev/RPC2")
     37
     38print server.tracrpc.api.list_xmlrpc_functions()
     39}}}
     40
     41List all tickets that are owned by athomas:
     42
     43{{{
     44#!python
     45import xmlrpclib
     46
     47server = xmlrpclib.ServerProxy("http://athomas:password@localhost/trac-dev/RPC2")
     48print server.tracrpc.ticket.query_tickets("owner=athomas")
     49}}}
     50
     51=== API Usage ===
     52Export a "hello world' function:
     53
     54{{{
     55#!python
     56from tracrpc.api import IXMLRPCProvider
     57from trac.core import Component, implements
     58
     59class HelloWorld(Component):
     60  implements(IXMLRPCProvider)
     61
     62  def hello_world(self):
     63    return "Hello world"
     64
     65  def get_xmlrpc_functions(self):
     66    yield ('WIKI_VIEW', self.hello_world)
     67}}}
     68
     69
     70== Author/Contributors ==
     71
     72'''Author:''' [wiki:athomas] [[BR]]
     73'''Contributors:'''
     74
     75[[TagIt(plugin,athomas,alpha,0.9)]]