Class: Midna::Broadcast
- Inherits:
-
Object
- Object
- Midna::Broadcast
- Defined in:
- lib/midna/broadcast.rb
Class Method Summary (collapse)
-
+ (Object) channel(code)
Return broadcasts for a Channel, based on the channel code.
-
+ (Object) channel_window(code, starttime, endtime)
Return broadcasts for a Channel in a given time window.
Class Method Details
+ (Object) channel(code)
Return broadcasts for a Channel, based on the channel code.
4 5 6 |
# File 'lib/midna/broadcast.rb', line 4 def self.channel(code) Midna.get("/channels/#{code}/broadcasts.xml").to_hash["broadcasts"] end |
+ (Object) channel_window(code, starttime, endtime)
Return broadcasts for a Channel in a given time window. starttime and endtime are integers (unixtimes).
10 11 12 |
# File 'lib/midna/broadcast.rb', line 10 def self.channel_window(code, starttime, endtime) Midna.get("/channels/#{code}/broadcasts.xml?start=#{starttime}&end=#{endtime}").to_hash["broadcasts"] end |