js/cloudmine.js
function(eventType, callback, context) {
      if (isFunction(callback)) {
        context = context || this;
        if (!this._events[eventType]) this._events[eventType] = [];

        // normal callback not called.
        var self = this;
        this._events[eventType].push([callback, context, function() {
          self.off(eventType, callback, context);
          callback.apply(this, arguments);
        }]);
      }
      return this;
    }
function(eventType, callback, context) {
      if (isFunction(callback)) {
        context = context || this;
        if (!this._events[eventType]) this._events[eventType] = [];

        // normal callback not called.
        var self = this;
        this._events[eventType].push([callback, context, function() {
          self.off(eventType, callback, context);
          callback.apply(this, arguments);
        }]);
      }
      return this;
    }
function ( eventType , callback , context ) { if ( isFunction ( callback ) ) { context = context || this ; if ( ! this . _events [ eventType ] ) this . _events [ eventType ] = [ ] ; // normal callback not called. var self = this ; this . _events [ eventType ] . push ( [ callback , context , function ( ) { self . off ( eventType , callback , context ) ; callback . apply ( this , arguments ) ; } ] ) ; } return this ; }
Attach an event listener to this APICall object.
@param {string|number} eventType The event to listen to. Can be an http code as number or string,
success, meta, result, error.
@param {function} callback Callback to call upon event trigger.
@param {object} context Context to call the callback in.
@return {APICall} The current APICall object
Attach an event listener to this APICall object .