- Easy to get started
- Easy to install/write a plugin
Plugin Interface
| module.exports = | |
| init: (req, options, next)-> | |
| next null, {} | |
| # Returning non-true values will result in 404 Not Found. | |
| # Default: true | |
| resourceExists: (req, context, next)-> | |
| next null, true |
| var deps = [ | |
| 'myapp.services', | |
| 'myapp.directives', | |
| 'myapp.controllers' | |
| ]; | |
| var app = angular.module('myapp', deps); |
| %% Create the state | |
| State1 = ot_text:create(), | |
| %% Make an op. Let's say the request wanted to add "foo" at position 0 | |
| Op1 = #ot_text_r{i="foo",p=0}, | |
| %% Apply the operation | |
| State2 = ot_text:apply(State1, [Op1]), | |
| %% State2 now equals "foo" |
| [ | |
| { | |
| "transaction": "{id}", | |
| "country": "...", | |
| "amount": "...", | |
| "experiment": "...", | |
| "device": "...", | |
| "longitude": "...", | |
| "latitude": "...", | |
| "timestamp": "..." |
| { "collection" : | |
| { | |
| "version" : "1.0", | |
| "href" : "http://example.org/friends/", | |
| "items" : | |
| [ | |
| { | |
| "href" : "...", | |
| "data" : |
| { "collection" : | |
| { | |
| "version" : "1.0", | |
| "href" : "http://example.org/friends/", | |
| "items" : | |
| [ | |
| { | |
| "href" : "...", | |
| "data" : |
| { | |
| "collection" : | |
| { | |
| "version" : "1.0", | |
| "href" : "https://graph.facebook.com/123456789", | |
| "items" : | |
| [ | |
| { | |
| "href" : "https://graph.facebook.com/123456789", |
| { | |
| "name": "Toby Campbell", | |
| "href": "http://profile.org/4165401", | |
| "picture": "http://profile.org/4165401/picture", | |
| "friends": { | |
| "href": "http://profile.org/4165401/friends", | |
| "data": [ | |
| { | |
| "name" : "Hugo S. Horton", | |
| "href" : "http://profile.org/250648607", |
| #main { | |
| background: #eee; | |
| padding: 20px; | |
| } | |
| #wrapper { | |
| min-height: 100%; | |
| height: auto !important; | |
| height: 100%; | |
| background: #eee; |