Class: Channel

Inherits:
Object show all
Defined in:
lib/data_services/channel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logger) ⇒ Channel

Returns a new instance of Channel.



10
11
12
13
14
15
16
17
# File 'lib/data_services/channel.rb', line 10

def initialize(logger)
  @logger = logger
  @call_sign = "";
  @cdvr_recordable = false;
  @number = "";
  @tms_id = "";
  @parentally_blocked = false;
end

Instance Attribute Details

#available_out_of_homeObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def available_out_of_home
  @available_out_of_home
end

#block_easObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def block_eas
  @block_eas
end

#call_signObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def call_sign
  @call_sign
end

#cdvr_recordableObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def cdvr_recordable
  @cdvr_recordable
end

#channel_numbersObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def channel_numbers
  @channel_numbers
end

#entitlement_idObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def entitlement_id
  @entitlement_id
end

#favoriteObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def favorite
  @favorite
end

#genresObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def genres
  @genres
end

#hdObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def hd
  @hd
end

#network_nameObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def network_name
  @network_name
end

#numberObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def number
  @number
end

#parentally_blockedObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def parentally_blocked
  @parentally_blocked
end

#tms_idObject

# Arriving from nns as a json structure which is parsed by the Lineup class # example: # (KMGH) HD”,“networkId”:“466”,“callSign”:“KMGHDT”,“streamUri”:“/ipvs/api/smarttv/stream/live/v1/5118”,“logoUrl”:“services.timewarnercable.com/imageserver/guide/20293”,“genres”:[“Broadcasters”],“availableOutOfHome”:false,“favorite”:false,“cdvrRecordable”:true,“blockEas”:true,“hd”:true,“channels”:[7],“streams”:[{“type”:“hls”,“drm”:true,“dai”:false,“uri”:“/ipvs/api/smarttv/stream/live/v1/5118?encoding=hls&drm-supported=true&dai-supported=false”,“cdnUrl”:“hls-lin-325.timewarnercable.com/hls/ae/KMGH/index.m3u8”,href="http://hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/un/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest">hls-lin-325.timewarnercable.com/ss/pr/KMGH.isml/Manifest”,href="http://hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8">hls-lin-325.timewarnercable.com/hls/un/KMGH/index.m3u8”],“parentallyBlocked”:false}



8
9
10
# File 'lib/data_services/channel.rb', line 8

def tms_id
  @tms_id
end

Instance Method Details

#populate(channel_hashmap) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/data_services/channel.rb', line 19

def populate channel_hashmap
  @channel_numbers = channel_hashmap["channels"]
  ncs_service_id = channel_hashmap ["ncsServiceId"]
  @tms_id = channel_hashmap["tmsId"]
  @entitlement_id = channel_hashmap["entitlementId"]
  @network_name = channel_hashmap["networkName"]
  network_id = channel_hashmap["networkId"]
  @call_sign = channel_hashmap["callSign"]
  stream_uri = channel_hashmap["streamUri"]
  logo_url = channel_hashmap["logoUrl"]
  @genres = channel_hashmap["genres"]
  @available_out_of_home = channel_hashmap["availableOutOfHome"]
  @favorite = channel_hashmap["favorite"]
  @cdvr_recordable = channel_hashmap["cdvrRecordable"]
  @block_eas = channel_hashmap["blockEas"]
  @hd = channel_hashmap["hd"]
  streams = channel_hashmap["streams"]
  @parentally_blocked = channel_hashmap["parentallyBlocked"]
end