methods
getSubscription(channel, topic)
Get a subscription definition
Parameters:
Name | Type | Description |
---|---|---|
channel |
string | |
topic |
string |
Returns:
The subscription definition
- Type
- object
once(channel [, topic] [, callback])
Subscribe to an event once
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
channel |
string | The channel to subscribe to |
|
topic |
string |
<optional> |
The topic to subscribe to |
callback |
callback |
<optional> |
What to do when you get the event |
Returns:
The subscription definition
- Type
- object
publish( [channel] [, topic] [, options])
Publish an event on the system bus
Parameters:
Name | Type | Argument | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
channel |
string |
<optional> |
'2' | The channel to publish to |
||||||||||
topic |
string |
<optional> |
1 | The topic to publish to |
||||||||||
options |
object |
<optional> |
{} | What to pass to the event Properties
|
subscribe(channel, topic [, callback])
Subscribe to an event
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
channel |
string | The channel to subscribe to |
|
topic |
string | The topic to subscribe to |
|
callback |
callback |
<optional> |
What to do when you get the event |
Returns:
The subscription definition
- Type
- object