Class: Oksky::Chat::Object::UserEventsResource
- Inherits:
-
Base
- Object
- Base
- Oksky::Chat::Object::UserEventsResource
show all
- Defined in:
- lib/oksky/chat/object/user_events_resource.rb
Instance Method Summary
collapse
Methods inherited from Base
#[], #initialize
Instance Method Details
#created_at_unix ⇒ Object
22
23
24
|
# File 'lib/oksky/chat/object/user_events_resource.rb', line 22
def created_at_unix
content_value("created_at_unix")
end
|
6
7
8
|
# File 'lib/oksky/chat/object/user_events_resource.rb', line 6
def id
@src.dig("id")
end
|
14
15
16
|
# File 'lib/oksky/chat/object/user_events_resource.rb', line 14
def kind
content_value("kind")
end
|
#relationships ⇒ Object
34
35
36
37
38
39
40
|
# File 'lib/oksky/chat/object/user_events_resource.rb', line 34
def relationships
if exist_relationships?
return @src['relationships']
else
{}
end
end
|
#resource_id ⇒ Object
18
19
20
|
# File 'lib/oksky/chat/object/user_events_resource.rb', line 18
def resource_id
content_value("resource_id")
end
|
#resource_type ⇒ Object
10
11
12
|
# File 'lib/oksky/chat/object/user_events_resource.rb', line 10
def resource_type
content_value("resource_type")
end
|
#user_event ⇒ Object
26
27
28
29
30
31
32
|
# File 'lib/oksky/chat/object/user_events_resource.rb', line 26
def user_event
if @src.has_key?('attributes')
@src['attributes']
else
@src
end
end
|
42
43
44
|
# File 'lib/oksky/chat/object/user_events_resource.rb', line 42
def user_id
relationships.dig("user", "id")
end
|