Class: FilmOn::Base

Inherits:
Object
  • Object
show all
Includes:
Services::Channels, Services::Groups, Services::VideoOnDemand
Defined in:
lib/film_on/base.rb

Defined Under Namespace

Classes: ApiError

Constant Summary collapse

TV_URI =
"www.filmon.com/tv/api/"
VOD_URI =
"www.filmon.com/api/vod/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Services::VideoOnDemand

#convert_genres, #convert_movie, #convert_vod_search, #genres, #movie, #vod_search

Methods included from Services::Groups

#convert_groups, #find_group, #groups

Methods included from Services::Channels

#channel, #channels, #convert_channel, #convert_channels

Constructor Details

#initialize(app_key, app_secret) ⇒ Base

FilmOn Api (www.filmon.com/page/api) initialize the wrapper with your app_key and app_secret for development purposes you can use “foo” and “bar” eg. film_on = FilmOn::Base.new(“foo”, “bar”) film_on.channels => returns an array of channels film_on.groups => returns an array of channel groups film_on.channel(14) => returns information for channel with id 14



27
28
29
30
31
32
33
34
# File 'lib/film_on/base.rb', line 27

def initialize(app_key, app_secret)
  @app_key = app_key
  @app_secret = app_secret
  @channel = {}
  @movie = {}
  @vod_search = {}
  init_request
end

Instance Attribute Details

#app_keyObject (readonly)

Returns the value of attribute app_key.



14
15
16
# File 'lib/film_on/base.rb', line 14

def app_key
  @app_key
end

#app_secretObject (readonly)

Returns the value of attribute app_secret.



14
15
16
# File 'lib/film_on/base.rb', line 14

def app_secret
  @app_secret
end

#session_keyObject (readonly)

Returns the value of attribute session_key.



14
15
16
# File 'lib/film_on/base.rb', line 14

def session_key
  @session_key
end