Class: TwicasStream::Supporter::GetSupportingStatus

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

Constant Summary collapse

PREFIX_URL =
'users'
SUFFIX_URL =
'supporting_status'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_id, target_user_id) ⇒ GetSupportingStatus

Returns a new instance of GetSupportingStatus.



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/twicas_stream/supporter.rb', line 16

def initialize user_id, target_user_id
	@response = Hash.new
	param = Hash.new

	param['target_user_id'] = target_user_id

	url = [BASE_URL, PREFIX_URL, user_id, SUFFIX_URL].join('/') + TwicasStream.make_query_string(param)
	# => 'https://apiv2.twitcasting.tv/users/:user_id/supporting_status?target_user_id=casma_jp'

	@response = TwicasStream.parse(TwicasStream.get(url))
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



10
11
12
# File 'lib/twicas_stream/supporter.rb', line 10

def response
  @response
end