-
Notifications
You must be signed in to change notification settings - Fork 6
APE Server API enhancements
Out of the box the APE Server + APS environment supports the official Server API plus some enhancements that the APS framework brings.
-
Originally
setTimeout
,clearTimeout
,setInterval
,clearInterval
are methods of the globalApe
object. For exampleApe.setTimeout()
can now be called assetTimeout()
instead like any other JavaScript environment. -
The
setProperty()
andgetProperty
methods for user and channel objects have been condensed into a single methodprop()
. If you are familiar with jQuery, it works similar to the jQuery.prop() function:-
user.prop("name", "Pablo")
sets the user's name public property to Pablo -
user.prop("name")
gets/returns the user's name public property value, returns false if not defined -
user.prop()
returns an array of all the user's public properties
-
-
New method
Ape.getUserByName()
, gets an user object by its name. Users must connect to the APE server with aname
property in order to be added to the lookup array ofgetUserByName()
. -
Enhanced
Ape.log()
function. When an object is passed to the log function its source is now the output instead of displaying something like[Object]
-
The
Function.prototype.bind
polyfill is added for older spidermonkey builds.