Module: PowerTrackV2::Stream
- Defined in:
- lib/powertrack_v2/stream.rb
Class Method Summary collapse
- .stream(url, opts = { ignore_heartbeat: true }, &block) ⇒ Object
- .url(publisher, account, stream_label) ⇒ Object
Class Method Details
.stream(url, opts = { ignore_heartbeat: true }, &block) ⇒ Object
7 8 9 10 |
# File 'lib/powertrack_v2/stream.rb', line 7 def self.stream(url, opts = { ignore_heartbeat: true }, &block) headers = PowerTrackV2::HTTP.headers PowerTrackV2::HTTP.stream(url, headers, opts, &block) end |
.url(publisher, account, stream_label) ⇒ Object
3 4 5 |
# File 'lib/powertrack_v2/stream.rb', line 3 def self.url(publisher, account, stream_label) "https://gnip-stream.#{publisher}.com/stream/powertrack/accounts/#{account}/publishers/#{publisher}/#{stream_label}.json" end |