From 9d8345d4e09a16f0d4067638560e2e8318727d03 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 4 Oct 2015 10:43:38 +0200 Subject: rpc.php: Display generated documentation Instead of hardcoding the RPC interface documentation in rpc.php, include the HTML code of the documentation page generated by AsciiDoc. Signed-off-by: Lukas Fleischer --- web/html/rpc.php | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'web') diff --git a/web/html/rpc.php b/web/html/rpc.php index 415dcb8..64c9562 100644 --- a/web/html/rpc.php +++ b/web/html/rpc.php @@ -12,33 +12,6 @@ if ( isset($_GET['type']) ) { echo $rpc_o->handle($_GET); } 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. -?> - -

Allowed methods

- -

Each method requires the following HTTP GET syntax:

-
type=methodname&arg=data
-

Where methodname is the name of an allowed method, and data is the argument to the call.

-

If you need jsonp type callback specification, you can provide an additional variable callback.

-

Examples

-
-
search
http://aur-url/rpc.php?type=search&arg=foobar
-
info
http://aur-url/rpc.php?type=info&arg=foobar
-
multiinfo
http://aur-url/rpc.php?type=multiinfo&arg[]=foo&arg[]=bar
-
msearch
http://aur-url/rpc.php?type=msearch&arg=john
-
Callback
http://aur-url/rpc.php?type=search&arg=foobar&callback=jsonp1192244621103
-
- - -- cgit v1.2.3-54-g00ecf