This file contains hidden or 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
| events: | |
| … | |
| "keypress #filter-string" : "filterOnEnter" |
This file contains hidden or 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
| class Todo extends KinveyModel | |
| … | |
| class TodoList extends KinveyCollection |
This file contains hidden or 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
| class Todo extends Backbone.Model | |
| … | |
| class TodoList extends Backbone.Collection |
This file contains hidden or 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
| url: "http://test.kinvey.com/appdata/APPKEY/todos" |
This file contains hidden or 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
| class Todo extends Backbone.Model | |
| … | |
| class TodoList extends Backbone.Collection |
This file contains hidden or 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
| class TodoList extends KinveyCollection | |
| url: "http://test.kinvey.com/appdata/#{kinvey_app_key}/todos" |
This file contains hidden or 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
| class Todos extends KinveyCollection | |
| url: -> | |
| url = "http://test.kinvey.com/appdata/#{kinvey_app_key}/todos" | |
| // if there is a filter string | |
| if @filterString | |
| // build the regex query - queries are JSON objects | |
| query = JSON.stringify( content: { $regex: @filterString } ) | |
| // make sure we URI encode the query! | |
| url += "?query=#{encodeURIComponent( query )}" | |
| // Return the final result |
This file contains hidden or 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
| NSString* accessToken = [FBSession activeSession].accessToken; | |
| [KCSUser loginWithFacebookAccessToken:accessToken withCompletionBlock:^(KCSUser *user, NSError *errorOrNil, KCSUserActionResult result) { | |
| if (errorOrNil) { | |
| //handle error | |
| } | |
| }]; |
This file contains hidden or 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
| // Create an author and book entity. | |
| var author = new Kinvey.Entity({ name: 'Joanne Rowling' }, 'authors'); | |
| var book = new Kinvey.Entity({ title: 'Harry Potter and the half-blood Prince', author: author }, 'books'); | |
| // Save both. | |
| book.save({ | |
| success: function(book) { | |
| // book is the book entity instance. | |
| // book.get('author') is the author entity instance. | |
| }, |