Skip to content

Instantly share code, notes, and snippets.

@ismaelc ismaelc/main.js

Last active Dec 27, 2015
What would you like to do?
Define the Cloud Code "yodaSpeakFunction" and initialize/call the Cloud Module "yodaSpeak"
// Cloud Code 'yodaSpeakFunction'
// Import Cloud Module from /cloud folder
// Initialize Cloud Code with your Mashape key (
var yodaClient = require('cloud/yoda-1.0.0.js');
yodaClient.initialize('<Enter your Mashape key here>');
Parse.Cloud.define("yodaSpeakFunction", function(request, response) {
// Call 'yodaSpeak' Cloud Module passing in 'sentence' parameter
// Please refer to for parameter details
sentence: request.params.sentence
success: function(httpResponse) {
error: function(httpResponse) {
response.error("Uh oh, something went wrong");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.