Longshot: events-client
Client-side events subscription using Socket.io
Installation
npm install ls-events-client --save
or
jspm install npm:ls-events-client
Usage
The events-client
API is fluent. See below:
// ES6; //events ; start ;
API
setHost
Set the host end-point details
: Client;
start
Connect to the end point
: Client;
subscribe
N.B.: context
, event
, and key
can be null or "*". These both refer to 'all'.
Context
: The type of object. E.g.users
,invoices
,orders
,items
, etc.Event
: The type of event raised. E.g.create
,read
,update
,delete
,notify
, etc.Key
: The key of the object.
: Client;