From c871fe1518cca0832970736358947f74468d38e6 Mon Sep 17 00:00:00 2001 From: schlatterbeck Date: Fri, 2 Oct 2009 15:03:44 +0000 Subject: [PATCH] Document filter method of xmlrpc interface git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4361 57a73879-2fb5-44c3-a270-3262357dd7e2 --- CHANGES.txt | 1 + doc/xmlrpc.txt | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 81f08fb..91232fb 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,7 @@ Fixes: - Small fix for CGI-handling of XMLRPC requests for python2.4, this worked only for 2.5 and beyond due to a change in the xmlrpc interface in python +- Document filter method of xmlrpc interface 2009-08-10 1.4.9 (r4346) diff --git a/doc/xmlrpc.txt b/doc/xmlrpc.txt index c071992..c054715 100644 --- a/doc/xmlrpc.txt +++ b/doc/xmlrpc.txt @@ -64,6 +64,13 @@ set arguments: *designator, arg_1 ... arg_N* Set the values of an existing item in the tracker as specified by ``designator``. The new values are specified in ``arg_1`` through ``arg_N``. The arguments are name=value pairs (e.g. ``status='3'``). + +filter arguments: *classname, list or None, attributes* + + list can be None (requires ``allow_none=True`` when + instantiating the ServerProxy) to indicate search for all values, + or a list of ids. The attributes are given as a dictionary of + name value pairs to search for. ======= ==================================================================== sample python client @@ -71,7 +78,7 @@ sample python client :: >>> import xmlrpclib - >>> roundup_server = xmlrpclib.ServerProxy('http://username:password@localhost:8000') + >>> roundup_server = xmlrpclib.ServerProxy('http://username:password@localhost:8000', allow_none=True) >>> roundup_server.list('user') ['admin', 'anonymous', 'demo'] >>> roundup_server.list('issue', 'id') @@ -85,4 +92,11 @@ sample python client {'status' : '3' } >>> roundup_server.create('issue', "title='another bug'", "status=2") '2' - + >>> roundup_server.filter('user',None,{'username':'adm'}) + ['1'] + >>> roundup_server.filter('user',['1','2'],{'username':'adm'}) + ['1'] + >>> roundup_server.filter('user',['2'],{'username':'adm'}) + [] + >>> roundup_server.filter('user',[],{'username':'adm'}) + [] -- 2.30.2