AUR web interface

Tasklist

FS#12605 - show package category in AURJson info

Attached to Project: AUR web interface
Opened by Vlad George (DonVla) - Sunday, 28 December 2008, 21:47 GMT
Last edited by Loui Chang (louipc) - Monday, 02 February 2009, 01:18 GMT
Task Type Feature Request
Category Backend
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 1.5.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

ReturnType info should also show the package category.
this would be much easier for AUR scripts than to parse the html files.
This task depends upon

Closed by  Loui Chang (louipc)
Monday, 02 February 2009, 01:18 GMT
Reason for closing:  Implemented
Comment by eliott (cactus) - Friday, 02 January 2009, 09:26 GMT
returning the category would require a join onto another table.
not saying that it can't or couldn't be done, but it would definitely increase the per-query overhead.

If returning the categoryID would be enough, that could be trivially added with near zero performance implications.
(you could have an array of categoryID to category names in you client app..those dont really ever change -- or change VERY rarely).

#######
--- web/lib/aurjson.class.php.old 2009-01-02 01:24:01.000000000 -0800
+++ web/lib/aurjson.class.php 2009-01-02 01:24:52.000000000 -0800
@@ -22,8 +22,8 @@
class AurJSON {
private $dbh = false;
private $exposed_methods = array('search','info');
- private $fields = array('ID','Name','Version','Description',
- 'URL','URLPath','License','NumVotes','OutOfDate');
+ private $fields = array('ID','Name','CategoryID','Version',
+ 'Description','URL','URLPath','License','NumVotes','OutOfDate');

/**
* Handles post data, and routes the request.
#########


or something like that..
Comment by Vlad George (DonVla) - Friday, 02 January 2009, 14:37 GMT
yes, the category id is totally sufficient.
thanks cactus!
Comment by Loui Chang (louipc) - Friday, 23 January 2009, 18:45 GMT
Patch is in git.
Comment by Loui Chang (louipc) - Monday, 02 February 2009, 01:18 GMT
| 1 | none |
| 2 | daemons |
| 3 | devel |
| 4 | editors |
| 5 | emulators |
| 6 | games |
| 7 | gnome |
| 8 | i18n |
| 9 | kde |
| 10 | lib |
| 11 | modules |
| 12 | multimedia |
| 13 | network |
| 14 | office |
| 15 | science |
| 16 | system |
| 17 | x11 |
| 18 | xfce |
| 19 | kernels |

Here are the current package category IDs for reference.

Loading...