Class: Oksky::Chat::Object::UserInfosResource
- Inherits:
-
Base
- Object
- Base
- Oksky::Chat::Object::UserInfosResource
show all
- Defined in:
- lib/oksky/chat/object/user_infos_resource.rb
Instance Method Summary
collapse
Methods inherited from Base
#[], #initialize
Instance Method Details
6
7
8
|
# File 'lib/oksky/chat/object/user_infos_resource.rb', line 6
def id
@src.dig("id")
end
|
#master_keyword_id ⇒ Object
34
35
36
|
# File 'lib/oksky/chat/object/user_infos_resource.rb', line 34
def master_keyword_id
relationships.dig("master_keyword", "data", "id")
end
|
#relationships ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/oksky/chat/object/user_infos_resource.rb', line 22
def relationships
if exist_relationships?
return @src['relationships']
else
{}
end
end
|
30
31
32
|
# File 'lib/oksky/chat/object/user_infos_resource.rb', line 30
def user_id
relationships.dig("user", "data", "id")
end
|
#user_info ⇒ Object
14
15
16
17
18
19
20
|
# File 'lib/oksky/chat/object/user_infos_resource.rb', line 14
def user_info
if @src.has_key?('attributes')
@src['attributes']
else
@src
end
end
|
#value_data ⇒ Object
10
11
12
|
# File 'lib/oksky/chat/object/user_infos_resource.rb', line 10
def value_data
content_value("value_data")
end
|