Module: Zulip::Client::EventStreaming
- Included in:
- Zulip::Client
- Defined in:
- lib/zulip/client/event_streaming.rb
Instance Method Summary collapse
- #stream_events(event_types, &block) ⇒ Object
- #stream_messages(&block) ⇒ Object
- #stream_private_messages(&block) ⇒ Object
- #stream_public_messages(&block) ⇒ Object
Instance Method Details
#stream_events(event_types, &block) ⇒ Object
21 22 23 24 25 |
# File 'lib/zulip/client/event_streaming.rb', line 21 def stream_events(event_types, &block) stream_raw_events(event_types) do |raw_event| yield parse_event(raw_event) end end |
#stream_messages(&block) ⇒ Object
5 6 7 |
# File 'lib/zulip/client/event_streaming.rb', line 5 def (&block) stream_events("message", &block) end |
#stream_private_messages(&block) ⇒ Object
9 10 11 12 13 |
# File 'lib/zulip/client/event_streaming.rb', line 9 def (&block) stream_raw_events("message") do |raw_event| yield parse_event(raw_event) if (raw_event) end end |
#stream_public_messages(&block) ⇒ Object
15 16 17 18 19 |
# File 'lib/zulip/client/event_streaming.rb', line 15 def (&block) stream_raw_events("message") do |raw_event| yield parse_event(raw_event) if (raw_event) end end |