comparison doc/xmlrpc.txt @ 4257:a70dbbc7f967

Document filter method of xmlrpc interface
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Fri, 02 Oct 2009 15:03:44 +0000
parents 905faf52a51f
children 3f251efd5f48
comparison
equal deleted inserted replaced
4256:712549bb7fe5 4257:a70dbbc7f967
62 set arguments: *designator, arg_1 ... arg_N* 62 set arguments: *designator, arg_1 ... arg_N*
63 63
64 Set the values of an existing item in the tracker as specified by 64 Set the values of an existing item in the tracker as specified by
65 ``designator``. The new values are specified in ``arg_1`` through 65 ``designator``. The new values are specified in ``arg_1`` through
66 ``arg_N``. The arguments are name=value pairs (e.g. ``status='3'``). 66 ``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.
67 ======= ==================================================================== 74 ======= ====================================================================
68 75
69 sample python client 76 sample python client
70 ==================== 77 ====================
71 :: 78 ::
72 79
73 >>> import xmlrpclib 80 >>> 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)
75 >>> roundup_server.list('user') 82 >>> roundup_server.list('user')
76 ['admin', 'anonymous', 'demo'] 83 ['admin', 'anonymous', 'demo']
77 >>> roundup_server.list('issue', 'id') 84 >>> roundup_server.list('issue', 'id')
78 ['1'] 85 ['1']
79 >>> roundup_server.display('issue1') 86 >>> roundup_server.display('issue1')
83 >>> roundup_server.set('issue1', 'status=3') 90 >>> roundup_server.set('issue1', 'status=3')
84 >>> roundup_server.display('issue1', 'status') 91 >>> roundup_server.display('issue1', 'status')
85 {'status' : '3' } 92 {'status' : '3' }
86 >>> roundup_server.create('issue', "title='another bug'", "status=2") 93 >>> roundup_server.create('issue', "title='another bug'", "status=2")
87 '2' 94 '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 []

Roundup Issue Tracker: http://roundup-tracker.org/