Class: FilmOn::Base
Constant Summary collapse
- URI =
"www.filmon.com/tv/api/"
Instance Attribute Summary collapse
-
#app_key ⇒ Object
readonly
Returns the value of attribute app_key.
-
#app_secret ⇒ Object
readonly
Returns the value of attribute app_secret.
-
#session_key ⇒ Object
readonly
Returns the value of attribute session_key.
Instance Method Summary collapse
- #init_request ⇒ Object
-
#initialize(app_key, app_secret) ⇒ Base
constructor
A new instance of Base.
Methods included from Services
Constructor Details
#initialize(app_key, app_secret) ⇒ Base
Returns a new instance of Base.
13 14 15 16 17 18 |
# File 'lib/film_on/base.rb', line 13 def initialize(app_key, app_secret) @app_key = app_key @app_secret = app_secret @channel = {} init_request end |
Instance Attribute Details
#app_key ⇒ Object (readonly)
Returns the value of attribute app_key.
11 12 13 |
# File 'lib/film_on/base.rb', line 11 def app_key @app_key end |
#app_secret ⇒ Object (readonly)
Returns the value of attribute app_secret.
11 12 13 |
# File 'lib/film_on/base.rb', line 11 def app_secret @app_secret end |
#session_key ⇒ Object (readonly)
Returns the value of attribute session_key.
11 12 13 |
# File 'lib/film_on/base.rb', line 11 def session_key @session_key end |
Instance Method Details
#init_request ⇒ Object
20 21 22 23 24 25 |
# File 'lib/film_on/base.rb', line 20 def init_request response = get("init") init_hash = JSON.parse(response) @session_key = init_hash["session_key"] self end |