[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#377520: New features, new format.



Hi!  This is for documenting purposes.

A new function has been added, "get_bugs", which allows to get a lot of
info through the SOAP interface.  And the namespace has changed.  This is
the updated proof-of-concept:

---

#!/usr/bin/python

import SOAPpy

url = 'http://bugs.donarmstrong.com/cgi-bin/soap.cgi'
ns = 'Debbugs/SOAP'
server = SOAPpy.SOAPProxy(url, ns)

# Uncomment those to enable debugging
# server.config.dumpSOAPOut = 1
# server.config.dumpSOAPIn = 1

server.soapaction = '%s#get_status' % ns
result = server.get_status(404404)
print result

server.soapaction = '%s#get_bugs' % ns
result = server.get_bugs("package","astyle")
print result

server.soapaction = '%s#get_bugs' % ns
result = server.get_bugs("src","linux-2.6", "severity", "grave")
print result

---

The output of this, is:

<SOAPpy.Types.structType s-gensym3 at -1217062452>: {'item':
<SOAPpy.Types.structType item at -1217063988>: {'value':
<SOAPpy.Types.structType value at -1217553684>: {'fixed_versions':
['ltsp/0.99debian10'], 'blockedby': '', 'keywords': 'l10n patch', 'done':
'Vagrant Cascadian <vagrant@freegeek.org>', 'owner': '', 'id': 404404,
'subject': 'ltsp: [INTL:es] Spanish gettext translation', 'forwarded': '',
'msgid': '<458E9768.8070008@gigared.com>', 'found_date': [], 'pending':
'done', 'originator': 'Felipe Caminos <felipem@gigared.com>', 'blocks': '',
'tags': 'l10n patch', 'date': 1166972615, 'mergedwith': '', 'severity':
'wishlist', 'package': 'ltsp', 'fixed_date': [], 'found_versions':
['0.99debian7'], 'found': <SOAPpy.Types.structType found at -1217554516>:
{'item': <SOAPpy.Types.structType item at -1217062004>: {'value': None,
'key': '0.99debian7'}}, 'fixed': <SOAPpy.Types.structType fixed at
-1217061684>: {'item': <SOAPpy.Types.structType item at -1217040308>:
{'value': None, 'key': 'ltsp/0.99debian10'}}}, 'key': 404404}}

<SOAPpy.Types.typedArrayType Array at -1216412692>: [355171, 201655,
118203, 415565, 412333, 112546, 375760, 397799, 270999, 413481]

<SOAPpy.Types.typedArrayType Array at -1217062452>: [344416, 375647,
375906, 391448, 366666, 375562, 376305, 401006, 347556, 377375, 329888,
331261, 395110, 395247, 400783, 369517, 389803, 373617, 402707, 399467,
366630, 333197, 366291, 376792, 417121, 392078, 368937, 368667, 375645,
373616, 393451, 401980, 375088, 375859, 337881, 375432, 350361, 377235,
376290, 396471, 409657, 376121, 410497, 373610, 376488, 321625, 368544,
376174]

---

More info on the get_bugs function, at:
http://bzr.donarmstrong.com/debbugs/source/Debbugs/Bugs.pm

-- 
Besos,          ,''`.
       Marga   : :' :
               `. `' 
                 `-  



Reply to: