forked from cast-networks/Backbone.Rpc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added custom method for collection
- all custom methods as object {method:'nameOfRPCMethod',values:{values as object}}
- Loading branch information
andy
committed
Feb 11, 2013
1 parent
1ad6823
commit 2c36a6b
Showing
1 changed file
with
63 additions
and
28 deletions.
There are no files selected for viewing
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
2c36a6b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit makes a test app I'm writing fail. I get data returned if I use the previous commit. The model's custom exception handler is called, but passed no exception object.
Here's the model:
var TextModel = Backbone.Model.extend({
url: '/xbmc',
namespace: 'VideoLibrary',
rpc: new Backbone.Rpc({
exceptionHandler: function (exception) {
console.log("Rpc.exceptionHandler");
if (exception) {
console.log("Exception code: " + exception.code + " - message: " + exception.message);
}
},
namespaceDelimiter: '.'
}),
methods: {
read : ["GetRecentlyAddedMovies"]
}
});