From: jerome Date: Wed, 18 Feb 2009 05:08:35 +0000 (+0000) Subject: web service MDL-12886 add xmlrpc documentation generator X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d3425d87e1d8f18ebc2f423114cd24c6e38b6d65;p=moodle.git web service MDL-12886 add xmlrpc documentation generator --- diff --git a/webservice/documentation.php b/webservice/documentation.php index 22d59576ef..b819d691df 100644 --- a/webservice/documentation.php +++ b/webservice/documentation.php @@ -45,11 +45,29 @@ function generate_documentation($protocol) { Every method has only one parameter which is an array.

For example in PHP for this specific function:
- Moodle path: user
+ Moodle path: user
tmp_delete_user( string username, integer mnethostid, )
You will call something like:
your_client->tmp_delete_user(array('username' => "username_to_delete",'mnethostid' => 1))
+EOF; + break; + case "xmlrpc": + $documentation = <<XMLRPC Manual + 1. Call the method authentication.tmp_get_token on "http://remotemoodle/webservice/xmlrpc/zend_xmlrpc_server.php"
+ Function parameter is an array: in PHP it would be array('username' => "wsuser", 'password' => "wspassword")
+ Return value is a token (integer)
+
+ 2. Then call a moodle web service method on "http://remotemoodle/webservice/xmlrpc/zend_xmlrpc_server.php?classpath=user&token=the_received_token"
+ Every method has only one parameter which is an array.
+
+ For example in PHP for this specific function:
+ Moodle path: user
+ tmp_delete_user( string username, integer mnethostid, )
+ You will call something like:
+ your_client->call('user.tmp_delete_user', array(array('username' => "username_to_delete",'mnethostid' => 1)))
+ EOF; break; default: