Module: Parse::API::CloudFunctions

Included in:
Client
Defined in:
lib/parse/api/cloud_functions.rb

Overview

Defines the CloudCode interface for the Parse REST API

Instance Method Summary collapse

Instance Method Details

#call_function(name, body = {}) ⇒ Parse::Response

Call a cloud function.

Parameters:

  • name (String)

    the name of the cloud function.

  • body (Hash) (defaults to: {})

    the parameters to forward to the function.

Returns:


14
15
16
# File 'lib/parse/api/cloud_functions.rb', line 14

def call_function(name, body = {})
  request :post, "functions/#{name}", body: body
end

#trigger_job(name, body = {}) ⇒ Parse::Response

Trigger a job.

Parameters:

  • name (String)

    the name of the job to trigger.

  • body (Hash) (defaults to: {})

    the parameters to forward to the job.

Returns:


22
23
24
# File 'lib/parse/api/cloud_functions.rb', line 22

def trigger_job(name, body = {})
  request :post, "jobs/#{name}", body: body
end