Class: TwicasStream::TwicasApiObject::User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elements = {}) ⇒ User

Returns a new instance of User.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/twicas_stream/twicas_api_object/user.rb', line 9

def initialize elements = {}
	@object = {
				:id               => elements['id'],
				:screen_id        => elements['screen_id'],
				:name             => elements['name'],
				:image            => elements['image'],
				:profile          => elements['profile'],
				:level            => elements['level'],
				:last_movie_id    => elements['last_movie_id'],
				:is_live          => elements['is_live'],
				:supporter_count  => elements['supporter_count'], # deprecated (2018/09/03's change log)
				:supporting_count => elements['supporting_count'], # deprecated (2018/09/03's change log)
				:created          => elements['created'] # deprecated (2018/08/03's change log)
			}
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



7
8
9
# File 'lib/twicas_stream/twicas_api_object/user.rb', line 7

def object
  @object
end