load
(since )
Load the APE client
Description
string
load
(
[object options] )
Load the APE client
Parameters
options
An object with ape default options
server - (string, optional) APE server URL
domain - (string, optional) Your domain, eg : yourdomain.com
identifier - (string) ; defaults to : ape identifier is used to differentiate two APE instance when you are using more than one application on your website and using Session.js
scripts - (array, optional) Javascript file to load
connectOptions - (object, optional) An object with connect arguments to send to APE server on connect. If given, as soon as APE Core is loaded, it connect to APE server with arguments given in connectOptions.
Examples
//Initialize client
client = new APE.Client();
client.load();
client.addEvent('load', function() {
console.log('Your APE client is loaded');
client.core.start({'name': 'apeUser'});
});
client.addEvent('start', function() {
console.log('You are connected to APE server. Now you can takeover the world');
};
//Initialize client
client = new APE.Client();
//Load APE Core and connect to server
client.load({
'domain': 'yourdomain.com',
'server': 'ape.yourdomain.com',
'scripts': ['yourdomain.com/APE_JSF/Build/uncompressed/apeCore.js'],
'connectOptions': {'name': 'anotherApeUser'}
});
client.addEvent('start', function() {
console.log('You are connected to APE server. Now you can takeover the world');
};
User notes
Post a note
CollaborAPE to our wiki !
Find the information you need on the APE Official Wiki : Install, Server, JSF, Help...

'identifier':'chatdemo',
'channel':'test'
I don't know what identifier does, but channel leads to the user being connected to a new channel 'test' when he runs the start() method (alias 'connect')
I wish this had been in the doc.