Class: TwicasStream::Movie::GetCurrentLive

Inherits:
Object
  • Object
show all
Defined in:
lib/twicas_stream/movie.rb

Constant Summary collapse

PREFIX_URL =
'users'
SUFFIX_URL =
'current_live'

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#responseObject (readonly)

Returns the value of attribute response.



121
122
123
# File 'lib/twicas_stream/movie.rb', line 121

def response
  @response
end