>From 466eecba716991bdf1c5e138c9a30bf59d6b8d71 Mon Sep 17 00: 00:00 2001
From: Sylvester Johansson <[EMAIL PROTECTED]>
Date: Thu, 29 May 2008 11:34:10 +0200
To: [email protected]
Subject: [PATCH] Added description of the json query method
Message-ID: <[EMAIL PROTECTED]>

---
 web/html/rpc.php |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/web/html/rpc.php b/web/html/rpc.php
index 033cba5..1dc5a02 100644
--- a/web/html/rpc.php
+++ b/web/html/rpc.php
@@ -18,12 +18,18 @@ if ( $_SERVER['REQUEST_METHOD'] == 'GET' ) {
         echo 'The methods currently allowed are: <br />';
         echo '<ul>';
         echo '<li>search</li>';
-        echo '<li>info</li>';
+       echo '<li>info</li>';
+       echo '<li>query</li>';
         echo '</ul><br />';
-        echo 'Each method requires the following HTTP GET syntax:<br />';
+        echo 'search and info requires the following HTTP GET syntax:<br />';
         echo '&nbsp;&nbsp; type=<i>methodname</i>&arg=<i>data</i> <br /><br 
/>';
         echo 'Where <i>methodname</i> is the name of an allowed method, and 
<i>data</i> is the argument to the call.<br />';
         echo '<br />';
+       echo 'a query is performed much the same way, except it has the 
following syntax:<br />';
+       echo '&nbsp;&nbsp; 
type=<i>query</i>&arg=<i>term</i>&include=<i>&lt;field1&gt;:&lt;field2&gt;:..:&lt;fieldN&gt;<i/>
 <br /><br />';
+       echo 'Where <i>term</i> is the search term that will match substrings 
in the package name or description. <br />';
+       echo '<i>&lt;fieldN&gt;</i> is a field that will be included in the 
value returned, and must be one of the following: <br />';
+       echo '&nbsp;&nbsp; ID, Name, Version, Description, URL, URLPath, 
License, NumVotes, QutOfDate <br /> <br />';
         echo 'If you need jsonp type callback specification, you can provide 
an additional variable <i>callback</i>.<br />';
         echo 'Example URL: <br />&nbsp;&nbsp; 
http://aur-url/rpc.php?type=search&arg=foobar&callback=jsonp1192244621103';
         echo '</body></html>';
-- 
1.5.5.1


Reply via email to