Class: Teams::Api::ChannelData
- Inherits:
-
Model
- Object
- Model
- Teams::Api::ChannelData
show all
- Defined in:
- lib/teams/api/channel_data.rb
Instance Attribute Summary
Attributes inherited from Model
#raw
Instance Method Summary
collapse
Methods inherited from Model
#initialize
Instance Method Details
#channel ⇒ Object
14
15
16
|
# File 'lib/teams/api/channel_data.rb', line 14
def channel
wrap(read("channel"), ChannelInfo)
end
|
#event_type ⇒ Object
26
27
28
|
# File 'lib/teams/api/channel_data.rb', line 26
def event_type
read("eventType", "event_type")
end
|
#feedback_loop ⇒ Object
39
40
41
42
|
# File 'lib/teams/api/channel_data.rb', line 39
def feedback_loop
value = read("feedbackLoop", "feedback_loop")
value.is_a?(Hash) ? ActivityValue.new(value) : value
end
|
#feedback_loop_enabled ⇒ Object
35
36
37
|
# File 'lib/teams/api/channel_data.rb', line 35
def feedback_loop_enabled
read("feedbackLoopEnabled", "feedback_loop_enabled")
end
|
#meeting ⇒ Object
18
19
20
|
# File 'lib/teams/api/channel_data.rb', line 18
def meeting
wrap(read("meeting"), MeetingInfo)
end
|
#notification ⇒ Object
22
23
24
|
# File 'lib/teams/api/channel_data.rb', line 22
def notification
wrap(read("notification"), NotificationInfo)
end
|
#settings ⇒ Object
30
31
32
33
|
# File 'lib/teams/api/channel_data.rb', line 30
def settings
value = read("settings")
value.is_a?(Hash) ? ActivityValue.new(value) : value
end
|
#stream_id ⇒ Object
44
45
46
|
# File 'lib/teams/api/channel_data.rb', line 44
def stream_id
read("streamId", "stream_id")
end
|
#stream_sequence ⇒ Object
52
53
54
|
# File 'lib/teams/api/channel_data.rb', line 52
def stream_sequence
read("streamSequence", "stream_sequence")
end
|
#stream_type ⇒ Object
48
49
50
|
# File 'lib/teams/api/channel_data.rb', line 48
def stream_type
read("streamType", "stream_type")
end
|
#team ⇒ Object
10
11
12
|
# File 'lib/teams/api/channel_data.rb', line 10
def team
wrap(read("team"), TeamInfo)
end
|
#tenant ⇒ Object
6
7
8
|
# File 'lib/teams/api/channel_data.rb', line 6
def tenant
wrap(read("tenant"), TenantInfo)
end
|
#to_h ⇒ Object
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/teams/api/channel_data.rb', line 56
def to_h
body = raw.dup
body["tenant"] = tenant.to_h if tenant
body["team"] = team.to_h if team
body["channel"] = channel.to_h if channel
body["meeting"] = meeting.to_h if meeting
body["notification"] = notification.to_h if notification
body["eventType"] = event_type if event_type
body["settings"] = settings.to_h if settings.respond_to?(:to_h)
body["feedbackLoopEnabled"] = feedback_loop_enabled unless feedback_loop_enabled.nil?
body["feedbackLoop"] = feedback_loop.to_h if feedback_loop.respond_to?(:to_h)
body["streamId"] = stream_id if stream_id
body["streamType"] = stream_type if stream_type
body["streamSequence"] = stream_sequence if stream_sequence
body.delete("event_type")
body.delete("feedback_loop_enabled")
body.delete("feedback_loop")
body.delete("stream_id")
body.delete("stream_type")
body.delete("stream_sequence")
body
end
|