Skip to content

Commit a641a62

Browse files
author
Ralf Schlatterbeck
committed
Document filter method of xmlrpc interface
1 parent d18780e commit a641a62

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Fixes:
2020
- Small fix for CGI-handling of XMLRPC requests for python2.4, this
2121
worked only for 2.5 and beyond due to a change in the xmlrpc interface
2222
in python
23+
- Document filter method of xmlrpc interface
2324

2425
2009-08-10 1.4.9 (r4346)
2526

doc/xmlrpc.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,21 @@ set arguments: *designator, arg_1 ... arg_N*
6464
Set the values of an existing item in the tracker as specified by
6565
``designator``. The new values are specified in ``arg_1`` through
6666
``arg_N``. The arguments are name=value pairs (e.g. ``status='3'``).
67+
68+
filter arguments: *classname, list or None, attributes*
69+
70+
list can be None (requires ``allow_none=True`` when
71+
instantiating the ServerProxy) to indicate search for all values,
72+
or a list of ids. The attributes are given as a dictionary of
73+
name value pairs to search for.
6774
======= ====================================================================
6875

6976
sample python client
7077
====================
7178
::
7279

7380
>>> import xmlrpclib
74-
>>> roundup_server = xmlrpclib.ServerProxy('http://username:password@localhost:8000')
81+
>>> roundup_server = xmlrpclib.ServerProxy('http://username:password@localhost:8000', allow_none=True)
7582
>>> roundup_server.list('user')
7683
['admin', 'anonymous', 'demo']
7784
>>> roundup_server.list('issue', 'id')
@@ -85,4 +92,11 @@ sample python client
8592
{'status' : '3' }
8693
>>> roundup_server.create('issue', "title='another bug'", "status=2")
8794
'2'
88-
95+
>>> roundup_server.filter('user',None,{'username':'adm'})
96+
['1']
97+
>>> roundup_server.filter('user',['1','2'],{'username':'adm'})
98+
['1']
99+
>>> roundup_server.filter('user',['2'],{'username':'adm'})
100+
[]
101+
>>> roundup_server.filter('user',[],{'username':'adm'})
102+
[]

0 commit comments

Comments
 (0)