Class: TwicasStream::User::GetUserInfo

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

Constant Summary collapse

PREFIX_URL =

{ :supporter_count => 10, :supporting_count => 24, :user => { :id => “182224938”, :screen_id => “twitcasting_jp”, :name => “ツイキャス公式”, :image => “”, :profile => “ツイキャスの公式アカウントです。ツイキャスに関するお知らせなどを投稿します。なお、お問い合わせは t.co/4gCf7XVm7N までお願いします。公式Facebookページ:ttps://t.co/bxYVwpzTJBn公式Instagramnt.co/Bm2O2J2Kfs”, :level => 24, :last_movie_id => “466324920”, :is_live => false, :supporter_count => 0, :supporting_count => 0, :created => 0 } }

'users'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_id) ⇒ GetUserInfo

Returns a new instance of GetUserInfo.



31
32
33
34
35
36
37
38
# File 'lib/twicas_stream/user.rb', line 31

def initialize user_id
	@response = Hash.new

	url = [BASE_URL, PREFIX_URL, user_id].join('/')
	# => 'https://apiv2.twitcasting.tv/users/:user_id'

	@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/user.rb', line 10

def response
  @response
end