Commit graph

11 commits

Author SHA1 Message Date
Lukas Fleischer
114edd9ff8 Provide more examples on the RPC info page
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-08-22 08:24:21 +02:00
Lukas Fleischer
fa53ca68b0 Cleanup RPC usage output a bit
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-05-29 16:06:28 +02:00
Lukas Fleischer
21827dfb1c Properly encode ampersands in the RPC usage output
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-05-29 15:58:46 +02:00
elij
4a24bca069 restructure the html/rpc.php endpoint
- move request_method test to the top, and catch other request types
  (HEAD, PUT, etc)
- change how html output is handled. instead of building a string, just
  output the html
- set appropriate response header for incorrect request_method.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-05-29 15:57:45 +02:00
Dan McGee
0488e8597c rpc: introduce multiinfo query (fixes FS#17583)
The majority of "real world" info requests [1] come in hefty batches. We
would be better served to handle these in one request rather than
multiple by allowing AUR clients to send multiple arguments.

This enables things like this to work:
    http://aur.test/rpc.php?type=multiinfo&arg[]=cups-xerox&arg[]=cups-mc2430dl&arg[]=10673

Note to RPC users: unfortunately due to the asinine design of PHP, you
unfortunately have to use the 'arg[]' syntax if you want more than one
query argument, or you will only get the package satisfying the last arg
you pass.

[1] Rough data from April 11, 2011, with a total hit count of 1,109,163:
     12 /login.php
     13 /rpc.php?type=sarch
     15 /rpc.php?type=msearch
     16 /pingserver.php
     16 /rpc.php
     22 /logout.php
    163 /passreset.php
    335 /account.php
    530 /pkgsubmit.php
    916 /rss2.php
   3838 /index.php
   6752 /rss.php
   9699 /
  42478 /rpc.php?type=search
 184737 /packages.php
 681725 /rpc.php?type=info

That means a whopping 61.5% of our requests were for info over the RPC
interface; package pages are a distant second at only 16.7%.

Lukas: Introduce "multiinfo" query instead of extending "info" (for the
sake of backward compatibility).

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-16 17:49:00 +02:00
Laszlo Papp
1eff1d223b Add usage output info for maintainer search extension
Add msearch type to the list on http://aur.archlinux.org/rpc.php

Signed-off-by: Laszlo Papp <djszapi@archlinux.us>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-09-28 18:55:50 -04:00
Dan McGee
46f2798524 Use include_once where applicable
All of these are sourcing function libraries so we don't need to include
them more than once. Things that insert actual HTML into the output were
left calling include().

Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-08-11 13:58:12 -04:00
Dan McGee
4af079a5bd rpc: small optimizations
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-08-11 13:58:11 -04:00
Loui Chang
610733eafd Remove excess whitespace.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
2009-06-25 00:05:44 -04:00
eliott
36dd7736c9 Moved usage documentation out of the class.
Fixed an issue in the handle class.
2008-01-19 23:49:35 -06:00
eliott
5e38e3d3d0 Added AurJSON code.
Added a JSON interface to the aur. This should make it easier for developers to integrate
command line utilities and poll against the AUR itself.
2008-01-19 23:49:35 -06:00