Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

APE Server API enhancements

Pablo Tejada edited this page Sep 22, 2013 · 5 revisions

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 global Ape object. For example Ape.setTimeout() can now be called as setTimeout() instead like any other JavaScript environment.

  • The setProperty() and getProperty methods for user and channel objects have been condensed into a single method prop(). 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 a name property in order to be added to the lookup array of getUserByName().

  • 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.

Clone this wiki locally