JSON-RPC interface to interact with DokuWiki from other Programms using Ajax Request
Compatible with DokuWiki
2008-05-05
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Properties:
Serverresponse, properties:
Code | Message | Description |
---|---|---|
-32700 | Parse error | Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text. |
-32600 | Invalid Request | The JSON sent is not a valid Request object. |
-32601 | Method not found | The method does not exist / is not available. |
-32602 | Invalid params | Invalid method parameter(s). |
-32603 | Internal error | Internal JSON-RPC error. |
-32099 to -32000 | Server error | Reserved for implementation-defined server-errors. |
YUI().use("io-base", function(Y) { var uri = sUrl + 'Your/Path/To/DokuWiki/lib/plugins/jsonrpc/jsonrpc.php'; var js_request = { jsonrpc: '2.0', id: '', method : { methodName : 'wiki.putPage' }, params : [ {string : 'myNamespace:myPage'}, {string : "==== myPage ==== \n This is my new Page!"} ]}; var json_request = YAHOO.lang.JSON.stringify(js_request); var cfg = { method: 'POST', data:json_request, headers: { 'Content-Type':'application/json' }, arguments: p.obj } var request = Y.io(uri,cfg); });