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:



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

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:



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

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