| Vendor | MindTouch |
| Type | Script |
| Categories | Developer |
| Requires | MindTouch Core 9.02 or later |
| Status | Work-in-progress |
| License | Free/Open Source |
| Manifest | http://scripts.mindtouch.com/dekiapi.xml |
Install Script
Table of Contents
Include AJAX API extension.
See also How to add a script, Using the Extension Dialog, Learn about DekiScript, Extensions Directory.
Include functions for MindTouch JavaScript API.
Parameters:
| Name | Type | Description |
| version | str | (optional) Version of MindTouch JavaScript API to use. (one of '0.1', '0.2'; default: most recent) |
<extension>
<title>MindTouch AJAX API Extension</title>
<label>MindTouch API</label>
<copyright>Copyright (c) 2006-2010 MindTouch Inc.</copyright>
<description>Include AJAX API extension.</description>
<requires host="MindTouch Core 9.02" />
<function>
<name>dekiapi</name>
<description>Include functions for MindTouch JavaScript API.</description>
<param name="version" type="str" optional="true">Version of MindTouch JavaScript API to use. (one of '0.1', '0.2'; default: most recent)</param>
<return>
<html xmlns:eval="http://mindtouch.com/2007/dekiscript">
<head>
<script type="text/javascript">
if(typeof Deki.Env == 'undefined') {
Deki.Env = {
SiteApi: <eval:js>site.uri & "@api" & "deki"</eval:js>,
PageApi: <eval:js>site.uri & "@api" & "deki" & "pages" & page.id</eval:js>,
UserApi: <eval:js>site.uri & "@api" & "deki" & "users" & user.id</eval:js>
};
}
</script>
<eval:if test="$version is nil || $version == '0.2'">
<script type="text/javascript" src="self:res/deki/mindtouch.web.js" />
<script type="text/javascript" src="self:res/deki/mindtouch.deki.js" />
</eval:if>
<eval:elseif test="$version == '0.1'">
<script type="text/javascript" src="self:res/deki/deki.api.js" />
</eval:elseif>
</head>
</html>
</return>
</function>
</extension>
This extension depends on the javascript files found here. If you choose to install the extension XML on your own wiki (rather than simply referencing the version on the Mindtouch servers), you will need to install these javascript files as well, in the following directory structure:
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by
Presently, I attached dekiapi.xml to my page, and linked to it for adding the script.
The script runs but I don't think it actually works.
I also created subdirectories of /opt/deki/src/services/Scripts/ and copied the other files in there but I really don't think this helps in any way...
(no 2010-11-17 version)
I attach the previous versions of the files on this page: http://developer.mindtouch.com/User:lcolombo#pageFiles
Array
(
[title] => Bad Request (400)
[message] => Invalid remote service: http://scripts.mindtouch.com/dekiapi.xml
[response] => Request URI:
http://localhost:8081/deki/site/services/51/start?dream.out.format=php&dream.in.host=localhost%3A8080&dream.in.scheme=http&dream.in.origin=127.0.0.1
Server response:
Array
(
[error] => Array
(
[message] => Invalid remote service: http://scripts.mindtouch.com/dekiapi.xml
[status] => 400
[title] => Bad Request
[uri] => http://localhost:8080/@api/deki/site/services/51/start?dream.out.format=php&dream.in.host=localhost:8080&dream.in.scheme=http&dream.in.origin=127.0.0.1
)
)
) edited 14:43, 6 Dec 2010
map is not valid; expected uri: /content/body/pre, line x, column 8
So for me the conclusion is: it doesn't work with MindTouch Core 2010.