EventApi
'EventApi' is a class representing Endpoint's API for context custom events.
Constructors
EventApi
Static Methods
create
Creates an instance of 'EventApi'.
Params
connection
core::Connection &
instance of 'Connection'
Returns
EventApi
·
EventApi object
Methods
emitEvent
Emits the custom event on the given Context and channel.
Params
contextId
const std::string &
ID of the Context
users
const std::vector<core::UserWithPubKey> &
list of UserWithPubKey objects which defines the recipients of the event
channelName
const std::string &
name of the Channel
eventData
const core::Buffer &
event's data
subscribeFor
Subscribe for the custom events on the given subscription query.
Params
subscriptionQueries
const std::vector<std::string> &
list of queries
Returns
std::vector<std::string>
·
list of subscriptionIds in maching order to subscriptionQueries
unsubscribeFrom
Unsubscribe from events for the given subscriptionId.
Params
subscriptionIds
const std::vector<std::string> &
list of subscriptionId
buildSubscriptionQuery
Generate subscription Query for the custom events.
Params
channelName
const std::string &
name of the Channel
selectorType
EventSelectorType
selector of scope on which you listen for events
selectorId
const std::string &
ID of the selector
Returns
std::string
·
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.