Class: Tangerine::ChannelSet

Inherits:
Base
  • Object
show all
Defined in:
lib/tangerine/backlot/channel_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, find, finder, #initialize, prepare_items

Constructor Details

This class inherits a constructor from Tangerine::Base

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def description
  @description
end

#embed_codeObject

Returns the value of attribute embed_code.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def embed_code
  @embed_code
end

#flight_start_timeObject

Returns the value of attribute flight_start_time.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def flight_start_time
  @flight_start_time
end

#heightObject

Returns the value of attribute height.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def height
  @height
end

#sizeObject

Returns the value of attribute size.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def size
  @size
end

#statObject

Returns the value of attribute stat.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def stat
  @stat
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def status
  @status
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def title
  @title
end

#updated_atObject

Returns the value of attribute updated_at.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def updated_at
  @updated_at
end

#uploaded_atObject

Returns the value of attribute uploaded_at.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def uploaded_at
  @uploaded_at
end

#widthObject

Returns the value of attribute width.



3
4
5
# File 'lib/tangerine/backlot/channel_set.rb', line 3

def width
  @width
end

Instance Method Details

#as_json(options = {}) ⇒ Object



20
21
22
# File 'lib/tangerine/backlot/channel_set.rb', line 20

def as_json(options = {})
  {:channels => channels}
end

#channelsObject



28
29
30
31
32
33
# File 'lib/tangerine/backlot/channel_set.rb', line 28

def channels
  result = Tangerine::Backlot::API.get('/channel_sets', 'mode' => 'list', 'channelSetEmbedCode' => embed_code)
  items = result.parsed_response['channelSet']['channel']
  items = Tangerine::Base.prepare_items(items)
  items.collect {|item| Tangerine::Channel.new(item) }
end

#to_json(options = {}) ⇒ Object



24
25
26
# File 'lib/tangerine/backlot/channel_set.rb', line 24

def to_json(options = {})
  {:channels => channels}.to_json
end