Skip to content

Instantly share code, notes, and snippets.

@couchoud
Created August 20, 2010 19:37
Show Gist options
  • Save couchoud/540975 to your computer and use it in GitHub Desktop.
Save couchoud/540975 to your computer and use it in GitHub Desktop.
post_4 - cs4
// Your call to update a user could look a little like this:
service.create(serviceDefinitions["updateUser"], user, {data:{first_name:"Jane", last_name:"Doe"}, success: someGlobalSuccessMethod})
// Your call to get a recipe could look like this:
service.create(serviceDefinitions["getRecipe"], recipe, {success: someGlobalSuccessMethod});
// Some other call that involves some processing
var resource = $.extend({},user);
resource["fullName"] = function() {return this.firstName + this.lastName};
service.create(serviceDefinitions["getUserByFullName"], resource, {success: someGlobalSuccessMethod});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment