Created
August 20, 2010 19:37
-
-
Save couchoud/540975 to your computer and use it in GitHub Desktop.
post_4 - cs4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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