X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dakweb%2Fqueries%2Fmadison.py;h=82a3af5b31048ab1b60fab5a43303b902bc9955b;hb=ccf6713b942fa54eafddcd035fd59c61ac1f3ecf;hp=9678a36ebeb021fd818ab68401bf6c445b544809;hpb=c4a632e83afddddc51fe62927c343e9b54f6f69c;p=dak.git diff --git a/dakweb/queries/madison.py b/dakweb/queries/madison.py index 9678a36e..82a3af5b 100644 --- a/dakweb/queries/madison.py +++ b/dakweb/queries/madison.py @@ -1,3 +1,11 @@ +""" "Madison" interface + +@contact: Debian FTPMaster +@copyright: 2014 Ansgar Burchardt +@copyright: 2014 Joerg Jaspert +@license: GNU General Public License version 2 or later +""" + import bottle import json @@ -7,13 +15,21 @@ from dakweb.webregister import QueryRegister @bottle.route('/madison') def madison(): """ - Display information about packages. + Display information about B{package(s)}. + + @since: December 2014 + + @keyword package: Space seperated list of packages. + @keyword a: only show info for specified architectures. + @keyword b: only show info for a binary type. I{deb/udeb/dsc} + @keyword c: only show info for specified component(s). I{main/contrib/non-free} + @keyword s: only show info for this suite. + @keyword S: show info for the binary children of source pkgs. I{true/false} + @keyword f: output json format. I{json} + @see: L{I{suites}} on how to receive a list of valid suites. - b=TYPE only show info for binary TYPE - c=COMPONENT only show info for COMPONENT(s) - s=SUITE only show info for this suite - S=true show info for the binary children of source pkgs - f=json output json format + @rtype: text/plain or application/json + @return: Text or Json format of the data """ r = bottle.request @@ -21,6 +37,9 @@ def madison(): packages = r.query.get('package', '').split() kwargs = dict() + architectures = r.query.get('a', None) + if architectures is not None: + kwargs['architectures'] = architectures.split(",") binary_type = r.query.get('b', None) if binary_type is not None: kwargs['binary_types'] = [binary_type]