lib/cloud.js
function(name, data, options) {
      options = options || {};

      var request = Parse._request({
        route: "functions",
        className: name,
        method: 'POST',
        useMasterKey: options.useMasterKey,
        data: Parse._encode(data, null, true)
      });

      return request.then(function(resp) {
        return Parse._decode(null, resp).result;
      })._thenRunCallbacks(options);
    }
function(name, data, options) {
      options = options || {};

      var request = Parse._request({
        route: "functions",
        className: name,
        method: 'POST',
        useMasterKey: options.useMasterKey,
        data: Parse._encode(data, null, true)
      });

      return request.then(function(resp) {
        return Parse._decode(null, resp).result;
      })._thenRunCallbacks(options);
    }
function ( name , data , options ) { options = options || { } ; var request = Parse . _request ( { route : "functions" , className : name , method : 'POST' , useMasterKey : options . useMasterKey , data : Parse . _encode ( data , null , true ) } ) ; return request . then ( function ( resp ) { return Parse . _decode ( null , resp ) . result ; } ) . _thenRunCallbacks ( options ) ; }
Makes a call to a cloud function.
@param {String} name The function name.
@param {Object} data The parameters to send to the cloud function.
@param {Object} options A Backbone-style options object
options.success, if set, should be a function to handle a successful
call to a cloud function.  options.error should be a function that
handles an error running the cloud function.  Both functions are
optional.  Both functions take a single argument.
@return {Parse.Promise} A promise that will be resolved with the result
of the function.
Makes a call to a cloud function .