Size: 1740
Comment:
|
Size: 1402
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 32: | Line 32: |
#url = 'http://bugs.donarmstrong.com/cgi-bin/soap.cgi' | |
Line 37: | Line 36: |
# some debug output | |
Line 42: | Line 42: |
# server.soapaction = '%s#get_status' % namespace | |
Line 46: | Line 45: |
Line 48: | Line 46: |
# server.soapaction = '%s#get_bugs' % namespace | |
Line 52: | Line 49: |
# One bug print getStatus(419306) # > 1 bug print getStatus(409909, 419920, 421581, 417044, 397993, 419411, 419306) |
# All bugs from one package (returns a list of bugnumbers) print getBugs("package", "gtk-qt-engine") |
Line 57: | Line 52: |
# All bugs from gtk-qt-engine + the status of 'em | # returns the status of those bugs print getStatus(409909, 419920, 421581, 417044, 397993) # getStatus and getBugs combined: |
Line 63: | Line 61: |
Why do I have to set the namespace in the server AND before every soapaction in python?:: Looks like you don't need the SOAPProxy.soapaction-thingy at all, just set the namespace in the C'tor of the SOAPProxy and call the remote methods as usual. |
Debbugs' SOAP Interface Documentation
Please help to keep this documentation up to date!
URL and Namespace
http://bugs.debian.org/cgi-bin/soap.cgi is the official SOAP interface for Debian's BTS.
http://bugs.donarmstrong.com/cgi-bin/soap.cgi is the development version.
The namespace is Debbugs/SOAP
Available methods for bugs.debian.org
http://bugs.debian.org/debbugs-source/mainline/Debbugs/SOAP.pm
- get_status(bugnumber [, bugnumber]*)
- returns the status if the given bugs
- get_bugs
- returns bar
Available methods for bugs.donarmstrong.com
Examples
Python
1 #!/usr/bin/env python
2
3
4 import SOAPpy
5
6 url = 'http://bugs.debian.org/cgi-bin/soap.cgi'
7 namespace = 'Debbugs/SOAP'
8 server = SOAPpy.SOAPProxy(url, namespace)
9
10 # some debug output
11 #server.config.dumpSOAPOut = 1
12 #server.config.dumpSOAPIn = 1
13
14
15 def getStatus(*args):
16 result = server.get_status(*args)
17 return result
18
19 def getBugs(*args):
20 result = server.get_bugs(*args)
21 return result
22
23 # All bugs from one package (returns a list of bugnumbers)
24 print getBugs("package", "gtk-qt-engine")
25
26 # returns the status of those bugs
27 print getStatus(409909, 419920, 421581, 417044, 397993)
28
29 # getStatus and getBugs combined:
30 getStatus(getBugs("package", "gtk-qt-engine"))