Module: Lineups

Included in:
DataDelivery
Defined in:
lib/data_delivery/lineups.rb

Instance Method Summary collapse

Instance Method Details

#lineup_airings(lineup_id, airing_start_time, params) ⇒ Object



20
21
22
23
24
25
# File 'lib/data_delivery/lineups.rb', line 20

def lineup_airings(lineup_id, airing_start_time, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  params[:startDateTime] = airing_start_time
  JSON.parse(get("lineups/#{lineup_id}/grid", params))
end

#lineup_by_postal_code(postal_code, params) ⇒ Object



2
3
4
5
6
7
# File 'lib/data_delivery/lineups.rb', line 2

def lineup_by_postal_code(postal_code, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  params[:postalCode] = postal_code
  JSON.parse(get('lineups', params))
end

#lineup_channel_listings(lineup_id, params) ⇒ Object



14
15
16
17
18
# File 'lib/data_delivery/lineups.rb', line 14

def lineup_channel_listings(lineup_id, params)
  params = {} unless params.is_a? Hash
  params[:api_key] = @api_key
  JSON.parse(get("lineups/#{lineup_id}/channels"), params)
end

#lineup_details(lineup_id) ⇒ Object



9
10
11
12
# File 'lib/data_delivery/lineups.rb', line 9

def lineup_details(lineup_id)
  params = { api_key: @api_key }
  JSON.parse(get("lineups/#{lineup_id}", params))
end