Class: TwicasStream::Movie::GetCurrentLive
- Inherits:
-
Object
- Object
- TwicasStream::Movie::GetCurrentLive
- Defined in:
- lib/twicas_stream/movie.rb
Constant Summary collapse
- PREFIX_URL =
'users'
- SUFFIX_URL =
'current_live'
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(user_id) ⇒ GetCurrentLive
constructor
A new instance of GetCurrentLive.
Constructor Details
#initialize(user_id) ⇒ GetCurrentLive
Returns a new instance of GetCurrentLive.
127 128 129 130 131 132 133 134 135 |
# File 'lib/twicas_stream/movie.rb', line 127 def initialize user_id @response = Hash.new #url = [BASE_URL, PREFIX_URL, user_id, SUFFIX_URL].join('/') url = BASE_URL + '/' + PREFIX_URL + '/' + user_id + '/' + SUFFIX_URL # => 'https://apiv2.twitcasting.tv/users/:user_id/current_live' @response = TwicasStream.parse(TwicasStream.get(url)) end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
121 122 123 |
# File 'lib/twicas_stream/movie.rb', line 121 def response @response end |