class FilmOn::Channel

FilmOn::Channel Channel can have either a basic set of data or a more verbose set depending on whether it is called as part of a channels list or as in individual call from channel, takes a raw hash and converts it into a nice ruby object

Attributes

adult_content[R]
alias[R]
chat_keyword[R]

extended

content_rating[R]
group[R]
group_id[R]
has_tvguide[R]
hash[R]
id[R]
images[R]
is_adult[R]

extended

is_favorite[R]
is_free[R]
is_free_sd_mode[R]
is_interactive[R]

extended

is_local[R]
is_vod[R]

extended

is_vox[R]

extended

next_playing[R]
now_playing[R]
preload_intro[R]
preload_message[R]
preload_timeout[R]
programmes[R]

extended

recordable[R]

extended

schedule[R]
seekable[R]
serverside_record[R]
title[R]
tvguide[R]
type[R]
upnp_enabled[R]

Public Class Methods

new(hash) click to toggle source
# File lib/film_on/models/channel.rb, line 18
def initialize(hash)
  @id = hash["id"]
  @title = hash["title"]
  @alias = hash["alias"]
  @logo = hash["logo"]
  @big_logo = hash["big_logo"]
  @content_rating = hash["content_rating"]
  @adult_content = hash["adult_content"]
  @group = hash["group"]
  @group_id = hash["group_id"]
  @is_free = hash["is_free"]
  @is_free_sd_mode = hash["is_free_sd_mode"]
  @type = hash["type"]
  @has_tvguide = hash["has_tvguide"]
  @seekable = hash["seekable"]
  @serverside_record = hash["serverside_record"]
  @extra_big_logo = hash["extra_big_logo"]
  @upnp_enabled = hash["upnp_enabled"]
  @is_favorite = hash["is_favorite"]
  #extended
  @is_adult = hash["is_adult"]
  @is_interactive = hash["is_interactive"]
  @is_vod = hash["is_vod"]
  @is_vox = hash["is_vox"]
  @chat_keyword = hash["chat_keyword"]
  @recordable = hash["recordable"]
  @preload_message = hash["preload_message"]
  @preload_timeout = hash["preload_timeout"]
  @is_local = hash["is_local"]
  @preload_intro = hash["preload_intro"]
  @images = hash["images"]
  @schedule = hash["schedule"]
  @now_playing = hash["now_playing"] ? FilmOn::Programme.new(hash["now_playing"]) : nil
  @next_playing = hash["next_playing"] ? FilmOn::Programme.new(hash["next_playing"]) : nil
  @tvguide = get_tvguide(hash["tvguide"])
end

Public Instance Methods

get_tvguide(guide) click to toggle source
# File lib/film_on/models/channel.rb, line 55
def get_tvguide(guide)
  return [] unless guide
  guide.map{|gu| FilmOn::Programme.new(gu) }
end