From 36dd7736c993cbcf61228f6e06466a6614939c97 Mon Sep 17 00:00:00 2001 From: eliott Date: Sat, 13 Oct 2007 12:27:35 -0700 Subject: Moved usage documentation out of the class. Fixed an issue in the handle class. --- web/html/rpc.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'web/html') diff --git a/web/html/rpc.php b/web/html/rpc.php index 3081391..033cba5 100644 --- a/web/html/rpc.php +++ b/web/html/rpc.php @@ -10,9 +10,22 @@ if ( $_SERVER['REQUEST_METHOD'] == 'GET' ) { if ( isset($_GET['type']) ) { echo $rpc_o->handle($_GET); } - else { + else { + // dump a simple usage output for people to use. + // this could be moved to an api doc in the future, or generated from + // the AurJSON class directly with phpdoc. For now though, just putting it here. echo ''; - echo $rpc_o->usage(); + echo 'The methods currently allowed are:
'; + echo '
'; + echo 'Each method requires the following HTTP GET syntax:
'; + echo '   type=methodname&arg=data

'; + echo 'Where methodname is the name of an allowed method, and data is the argument to the call.
'; + echo '
'; + echo 'If you need jsonp type callback specification, you can provide an additional variable callback.
'; + echo 'Example URL:
   http://aur-url/rpc.php?type=search&arg=foobar&callback=jsonp1192244621103'; echo ''; } } -- cgit v1.2.3-54-g00ecf