ConveyorInterface
Interfaces are used by the ConveyorModel
to get initial state values as well as to forward state changes to other systems, like an API. The ConveyorPushInterface
can also push values onto a model allowing for easy integration with services like Pusher or Socket.io.
Interfaces handle obtaining raw data and transforming it for the model.
ConveyorHttpInterface
ConveyorLocalStorageInterface
ConveyorPushInterface
Methods
Interface methods are surfaced as methods on the ConveyorModel
.
model.$fetch(params, options)
- Runs the fetch method on the associated interface and returns aConveyorModelCollection
.model.prototype.$save(options)
- Saves/Creates the currentConveyorModelState
to the associated interface.model.prototype.$delete(options)
- Delete the currentConveyorModel
from the associated interface.model.prototype.$create(options)
- Creates the currentConveyorModel
on the associated interface.