Module: Pubnub::Client::PagedHistory
- Included in:
- Pubnub::Client
- Defined in:
- lib/pubnub/client/paged_history.rb
Overview
Module that holds paged_history event logic
Instance Method Summary collapse
Instance Method Details
#paged_history(options = {}, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/pubnub/client/paged_history.rb', line 7 def paged_history( = {}, &block) channel = .fetch(:channel) page = .fetch(:page, 1) limit = .fetch(:limit, 100) callback = .fetch(:callback, block) sync = [:http_sync] start_tt = .fetch(:start) end_tt = .fetch(:end) if sync sync_paged_history(channel, page, limit, callback, start: start_tt, end: end_tt) else async_paged_history() end end |