{ "call_on_each_event": [ { "argument": "narrow", "description": "A JSON-encoded array of length 2 indicating the narrow for which you'd like to receive events for. For instance, to receive events for the stream `Denmark`, you would specify `narrow=['stream', 'Denmark']`. Another example is `narrow=['is', 'private']` for private messages. Default is `[]`.", "required": false, "example": "narrow=['stream', 'Denmark']" }, { "argument": "event_types", "description": "A JSON-encoded array indicating which types of events you're interested in. Values that you might find useful include:

* **message** (messages),
* **subscription** (changes in your subscriptions),
* **realm_user** (changes in the list of users in your realm)

If you do not specify this argument, you will receive all events, and have to filter out the events not relevant to your client in your client code. For most applications, one is only interested in messages, so one specifies: `event_types=['message']`", "required": false, "example": "event_types=['message']" } ] }