Api
Main interface to communicate with a store
Constructor Summary
Public Constructor | ||
public |
constructor(url: String) Create a new Api instance |
Member Summary
Public Members | ||
public |
Cached ProjectCollection |
Protected Members | ||
protected |
Websocket client used for communication with a store |
Method Summary
Public Methods | ||
public |
applyChange(change: Change): Promise Apply a change to the store |
|
public |
applyChanges(changes: Changes): Promise Apply multiple changes to the store |
|
public |
createPutItemStream(projectId: String, schemaId: String, projectVersion: Number, listen: Boolean): Stream Create a write stream to store items |
|
public |
Remove an item |
|
public |
Retrieve all projects at all versions |
|
public |
Retrieve a ProjectCollection |
|
public |
Listen to events from the store |
|
public |
Store an item |
Protected Methods | ||
protected |
handleResponse(response: Object): * Handles websocket result |
Public Constructors
Public Members
Protected Members
protected websocketClient: WebsocketClient source
Websocket client used for communication with a store
Public Methods
public applyChange(change: Change): Promise source
Apply a change to the store
Params:
Name | Type | Attribute | Description |
change | Change |
public applyChanges(changes: Changes): Promise source
Apply multiple changes to the store
Params:
Name | Type | Attribute | Description |
changes | Changes | Array of changes |
public createPutItemStream(projectId: String, schemaId: String, projectVersion: Number, listen: Boolean): Stream source
Create a write stream to store items
public putItem(projectId: String, schemaId: String, item: Item, projectVersion: Number): Promise source
Store an item