Created
December 18, 2015 15:11
-
-
Save michael/8a9f6dd18f8051662dcf to your computer and use it in GitHub Desktop.
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
| DB OPERATIONS | |
| ================================= | |
| {} | |
| Substance Storage API | |
| ======================== | |
| // Connect to scope | |
| storage.insertChanges('note-25', [SubstanceOperation, SubstanceOperation]); | |
| storage.delete('note-25'); // delete all data in scope | |
| store.getChanges('note-13); // all changes! | |
| // Get snapshot | |
| storage.getSnapshot('change-sha-12'); // give me a Substance.DataGraph | |
| Substance Websocket API | |
| ======================== | |
| ws.insertChanges = function(changes) { | |
| var result = storage.insertChanges(changes); | |
| ws.return(result); | |
| }; | |
| Substance Notepad App (JS Client) | |
| ======================== | |
| // Get a note for the notepad | |
| hub.getSnapshot('note-13', 'change-sha-12'); | |
| // History slider | |
| hub.getChanges('note-13); // all changes! | |
| // | |
| hub.insertChanges('note-13', [Changes...]) | |
| server.getNote('lkasdj flaj') | |
| notepad.html#documentId=asfljsd:lkadf ad | |
| Substance Storage API | |
| ======================== | |
| createOperations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment