twilio-ruby 5.27.0 → 5.27.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.dockerignore +1 -0
- data/CHANGES.md +13 -0
- data/CONTRIBUTING.md +2 -0
- data/Dockerfile +2 -2
- data/README.md +2 -2
- data/lib/twilio-ruby/http/http_client.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +18 -18
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +9 -9
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +9 -9
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +5 -5
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +10 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +1 -1
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +12 -12
- data/lib/twilio-ruby/rest/flex_api.rb +6 -3
- data/lib/twilio-ruby/rest/flex_api/v1.rb +3 -3
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +23 -23
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +39 -37
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +102 -96
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +20 -20
- data/lib/twilio-ruby/rest/messaging.rb +3 -2
- data/lib/twilio-ruby/rest/messaging/v1.rb +2 -3
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +124 -91
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +22 -18
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +22 -16
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +18 -20
- data/lib/twilio-ruby/rest/messaging/v1/session.rb +48 -44
- data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +46 -48
- data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +55 -62
- data/lib/twilio-ruby/rest/messaging/v1/session/webhook.rb +61 -65
- data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +30 -36
- data/lib/twilio-ruby/rest/monitor.rb +4 -2
- data/lib/twilio-ruby/rest/monitor/v1.rb +2 -2
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +45 -57
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +47 -50
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +8 -8
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +3 -3
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +6 -6
- data/lib/twilio-ruby/rest/preview/trusted_comms/device.rb +1 -1
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +55 -55
- data/lib/twilio-ruby/rest/pricing/v2/voice.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +4 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/serverless.rb +2 -1
- data/lib/twilio-ruby/rest/serverless/v1.rb +1 -2
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +27 -28
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +22 -22
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +22 -22
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +25 -24
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +26 -24
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +21 -24
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +31 -31
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +35 -35
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +22 -22
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +22 -22
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +12 -12
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +7 -4
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +6 -3
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +15 -9
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +6 -3
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +15 -9
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +9 -6
- data/lib/twilio-ruby/rest/taskrouter.rb +2 -1
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +102 -95
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +52 -44
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +90 -81
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +152 -136
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +35 -29
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +96 -89
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +61 -61
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +27 -21
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +46 -46
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +57 -64
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +98 -79
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +41 -39
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +39 -33
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +32 -31
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +16 -11
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +42 -42
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +75 -72
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +59 -51
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +24 -18
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +54 -46
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +48 -46
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +17 -17
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +44 -42
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +24 -18
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +1 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +1 -2
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +12 -12
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +6 -6
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +6 -6
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +2 -1
- data/lib/twilio-ruby/rest/video.rb +8 -8
- data/lib/twilio-ruby/rest/video/v1.rb +4 -7
- data/lib/twilio-ruby/rest/video/v1/composition.rb +89 -98
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +224 -195
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +34 -34
- data/lib/twilio-ruby/rest/video/v1/recording.rb +53 -55
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +32 -32
- data/lib/twilio-ruby/rest/video/v1/room.rb +71 -61
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +45 -33
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +56 -57
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +25 -22
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +10 -10
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +24 -23
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +5 -5
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +2 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/conversations/v1/conversation/message_spec.rb +58 -0
- metadata +4 -4
@@ -24,8 +24,7 @@ module Twilio
|
|
24
24
|
end
|
25
25
|
|
26
26
|
##
|
27
|
-
# @param [String] sid The
|
28
|
-
# Composition Hook to fetch.
|
27
|
+
# @param [String] sid The SID of the CompositionHook resource to fetch.
|
29
28
|
# @return [Twilio::REST::Video::V1::CompositionHookContext] if sid was passed.
|
30
29
|
# @return [Twilio::REST::Video::V1::CompositionHookList]
|
31
30
|
def composition_hooks(sid=:unset)
|
@@ -45,8 +44,7 @@ module Twilio
|
|
45
44
|
end
|
46
45
|
|
47
46
|
##
|
48
|
-
# @param [String] sid The
|
49
|
-
# fetch.
|
47
|
+
# @param [String] sid The SID of the Recording resource to fetch.
|
50
48
|
# @return [Twilio::REST::Video::V1::RecordingContext] if sid was passed.
|
51
49
|
# @return [Twilio::REST::Video::V1::RecordingList]
|
52
50
|
def recordings(sid=:unset)
|
@@ -66,8 +64,7 @@ module Twilio
|
|
66
64
|
end
|
67
65
|
|
68
66
|
##
|
69
|
-
# @param [String] sid The
|
70
|
-
# to fetch.
|
67
|
+
# @param [String] sid The SID of the Composition resource to fetch.
|
71
68
|
# @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
|
72
69
|
# @return [Twilio::REST::Video::V1::CompositionList]
|
73
70
|
def compositions(sid=:unset)
|
@@ -81,7 +78,7 @@ module Twilio
|
|
81
78
|
end
|
82
79
|
|
83
80
|
##
|
84
|
-
# @param [String] sid The
|
81
|
+
# @param [String] sid The SID of the Room resource to fetch.
|
85
82
|
# @return [Twilio::REST::Video::V1::RoomContext] if sid was passed.
|
86
83
|
# @return [Twilio::REST::Video::V1::RoomList]
|
87
84
|
def rooms(sid=:unset)
|
@@ -29,14 +29,14 @@ module Twilio
|
|
29
29
|
# Lists CompositionInstance records from the API as a list.
|
30
30
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
31
|
# memory before returning.
|
32
|
-
# @param [composition.Status] status
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
# @param [String] room_sid
|
32
|
+
# @param [composition.Status] status Read only Composition resources with this
|
33
|
+
# status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`.
|
34
|
+
# @param [Time] date_created_after Read only Composition resources created on or
|
35
|
+
# after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with
|
36
|
+
# time zone.
|
37
|
+
# @param [Time] date_created_before Read only Composition resources created before
|
38
|
+
# this ISO 8601 date-time with time zone.
|
39
|
+
# @param [String] room_sid Read only Composition resources with this Room SID.
|
40
40
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
41
41
|
# guarantees to never return more than limit. Default is no limit
|
42
42
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -59,14 +59,14 @@ module Twilio
|
|
59
59
|
# Streams CompositionInstance records from the API as an Enumerable.
|
60
60
|
# This operation lazily loads records as efficiently as possible until the limit
|
61
61
|
# is reached.
|
62
|
-
# @param [composition.Status] status
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
# @param [String] room_sid
|
62
|
+
# @param [composition.Status] status Read only Composition resources with this
|
63
|
+
# status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`.
|
64
|
+
# @param [Time] date_created_after Read only Composition resources created on or
|
65
|
+
# after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with
|
66
|
+
# time zone.
|
67
|
+
# @param [Time] date_created_before Read only Composition resources created before
|
68
|
+
# this ISO 8601 date-time with time zone.
|
69
|
+
# @param [String] room_sid Read only Composition resources with this Room SID.
|
70
70
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
71
71
|
# guarantees to never return more than limit. Default is no limit.
|
72
72
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -105,14 +105,14 @@ module Twilio
|
|
105
105
|
##
|
106
106
|
# Retrieve a single page of CompositionInstance records from the API.
|
107
107
|
# Request is executed immediately.
|
108
|
-
# @param [composition.Status] status
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
#
|
114
|
-
#
|
115
|
-
# @param [String] room_sid
|
108
|
+
# @param [composition.Status] status Read only Composition resources with this
|
109
|
+
# status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`.
|
110
|
+
# @param [Time] date_created_after Read only Composition resources created on or
|
111
|
+
# after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with
|
112
|
+
# time zone.
|
113
|
+
# @param [Time] date_created_before Read only Composition resources created before
|
114
|
+
# this ISO 8601 date-time with time zone.
|
115
|
+
# @param [String] room_sid Read only Composition resources with this Room SID.
|
116
116
|
# @param [String] page_token PageToken provided by the API
|
117
117
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
118
118
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -151,38 +151,31 @@ module Twilio
|
|
151
151
|
##
|
152
152
|
# Retrieve a single page of CompositionInstance records from the API.
|
153
153
|
# Request is executed immediately.
|
154
|
-
# @param [String] room_sid Group Room
|
155
|
-
#
|
156
|
-
# @param [Hash] video_layout
|
157
|
-
#
|
158
|
-
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts)
|
159
|
-
# @param [String] audio_sources An array of
|
160
|
-
#
|
154
|
+
# @param [String] room_sid The SID of the Group Room with the media tracks to be
|
155
|
+
# used as composition sources.
|
156
|
+
# @param [Hash] video_layout An object that describes the video layout of the
|
157
|
+
# composition in terms of regions. See [Specifying Video
|
158
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
159
|
+
# @param [String] audio_sources An array of track names from the same group room
|
160
|
+
# to merge into the new composition. Can include zero or more track names. The new
|
161
|
+
# composition includes all audio sources specified in `audio_sources` except for
|
162
|
+
# those specified in `audio_sources_excluded`. The track names in this parameter
|
163
|
+
# can include an asterisk as a wild card character, which will match zero or more
|
164
|
+
# characters in a track name. For example, `student*` includes `student` as well
|
165
|
+
# as `studentTeam`.
|
166
|
+
# @param [String] audio_sources_excluded An array of track names to exclude. The
|
167
|
+
# new composition includes all audio sources specified in `audio_sources` except
|
168
|
+
# for those specified in `audio_sources_excluded`. The track names in this
|
169
|
+
# parameter can include an asterisk as a wild card character, which will match
|
170
|
+
# zero or more characters in a track name. For example, `student*` excludes
|
171
|
+
# `student` as well as `studentTeam`. This parameter can also be empty.
|
172
|
+
# @param [String] resolution A string that describes the columns (width) and rows
|
173
|
+
# (height) of the generated composed video in pixels. Defaults to `640x480`.
|
174
|
+
# The string's format is `{width}x{height}` where:
|
161
175
|
#
|
162
|
-
# *
|
163
|
-
# *
|
164
|
-
# *
|
165
|
-
# * Zero or more Track names. These can be specified using wildcards (e.g.
|
166
|
-
# `student*`). The use of `[*]` has semantics "all if any" meaning zero or more
|
167
|
-
# (i.e. all) depending on whether the target room had audio tracks.
|
168
|
-
# @param [String] audio_sources_excluded An array of audio sources to exclude from
|
169
|
-
# the Composition. Any new Composition shall include all audio sources specified
|
170
|
-
# in `AudioSources` except for the ones specified in `AudioSourcesExcluded`. This
|
171
|
-
# parameter may include:
|
172
|
-
#
|
173
|
-
# * Zero or more `RecordingTrackSid`
|
174
|
-
# * Zero or more `MediaTrackSid`
|
175
|
-
# * Zero or more `ParticipantSid`
|
176
|
-
# * Zero or more Track names. These can be specified using wildcards (e.g.
|
177
|
-
# `student*`)
|
178
|
-
# @param [String] resolution A string representing the number of pixels for rows
|
179
|
-
# (width) and columns (height) of the generated composed video. This string must
|
180
|
-
# have the format `{width}x{height}`. This parameter must comply with the
|
181
|
-
# following constraints:
|
182
|
-
#
|
183
|
-
# * `width >= 16 && width <= 1280`
|
184
|
-
# * `height >= 16 && height <= 1280`
|
185
|
-
# * `width * height <= 921,600`
|
176
|
+
# * 16 <= `{width}` <= 1280
|
177
|
+
# * 16 <= `{height}` <= 1280
|
178
|
+
# * `{width}` * `{height}` <= 921,600
|
186
179
|
#
|
187
180
|
# Typical values are:
|
188
181
|
#
|
@@ -191,27 +184,27 @@ module Twilio
|
|
191
184
|
# * VGA = `640x480`
|
192
185
|
# * CIF = `320x240`
|
193
186
|
#
|
194
|
-
# Note that the `
|
195
|
-
#
|
196
|
-
#
|
197
|
-
#
|
198
|
-
#
|
199
|
-
#
|
200
|
-
#
|
201
|
-
#
|
202
|
-
#
|
203
|
-
#
|
204
|
-
#
|
205
|
-
#
|
206
|
-
#
|
207
|
-
# @param [String] status_callback_method HTTP method
|
208
|
-
#
|
209
|
-
# @param [Boolean] trim
|
210
|
-
#
|
211
|
-
# Room
|
212
|
-
#
|
213
|
-
#
|
214
|
-
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts)
|
187
|
+
# Note that the `resolution` imposes an aspect ratio to the resulting composition.
|
188
|
+
# When the original video tracks are constrained by the aspect ratio, they are
|
189
|
+
# scaled to fit. See [Specifying Video
|
190
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
191
|
+
# @param [composition.Format] format The container format of the composition's
|
192
|
+
# media files. Can be: `mp4` or `webm` and the default is `webm`. If you specify
|
193
|
+
# `mp4` or `webm`, you must also specify one or more `audio_sources` and/or a
|
194
|
+
# `video_layout` element that contains a valid `video_sources` list, otherwise an
|
195
|
+
# error occurs.
|
196
|
+
# @param [String] status_callback The URL we should call using the
|
197
|
+
# `status_callback_method` to send status information to your application on every
|
198
|
+
# composition event. If not provided, status callback events will not be
|
199
|
+
# dispatched.
|
200
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
201
|
+
# `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
|
202
|
+
# @param [Boolean] trim Whether to clip the intervals where there is no active
|
203
|
+
# media in the composition. The default is `true`. Compositions with `trim`
|
204
|
+
# enabled are shorter when the Room is created and no Participant joins for a
|
205
|
+
# while as well as if all the Participants leave the room and join later, because
|
206
|
+
# those gaps will be removed. See [Specifying Video
|
207
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
215
208
|
# @return [CompositionInstance] Newly created CompositionInstance
|
216
209
|
def create(room_sid: nil, video_layout: :unset, audio_sources: :unset, audio_sources_excluded: :unset, resolution: :unset, format: :unset, status_callback: :unset, status_callback_method: :unset, trim: :unset)
|
217
210
|
data = Twilio::Values.of({
|
@@ -279,8 +272,7 @@ module Twilio
|
|
279
272
|
##
|
280
273
|
# Initialize the CompositionContext
|
281
274
|
# @param [Version] version Version that contains the resource
|
282
|
-
# @param [String] sid The
|
283
|
-
# to fetch.
|
275
|
+
# @param [String] sid The SID of the Composition resource to fetch.
|
284
276
|
# @return [CompositionContext] CompositionContext
|
285
277
|
def initialize(version, sid)
|
286
278
|
super(version)
|
@@ -334,8 +326,7 @@ module Twilio
|
|
334
326
|
# Initialize the CompositionInstance
|
335
327
|
# @param [Version] version Version that contains the resource
|
336
328
|
# @param [Hash] payload payload that contains response from Twilio
|
337
|
-
# @param [String] sid The
|
338
|
-
# to fetch.
|
329
|
+
# @param [String] sid The SID of the Composition resource to fetch.
|
339
330
|
# @return [CompositionInstance] CompositionInstance
|
340
331
|
def initialize(version, payload, sid: nil)
|
341
332
|
super(version)
|
@@ -379,109 +370,109 @@ module Twilio
|
|
379
370
|
end
|
380
371
|
|
381
372
|
##
|
382
|
-
# @return [String]
|
373
|
+
# @return [String] The SID of the Account that created the resource
|
383
374
|
def account_sid
|
384
375
|
@properties['account_sid']
|
385
376
|
end
|
386
377
|
|
387
378
|
##
|
388
|
-
# @return [composition.Status] The status of the
|
379
|
+
# @return [composition.Status] The status of the composition
|
389
380
|
def status
|
390
381
|
@properties['status']
|
391
382
|
end
|
392
383
|
|
393
384
|
##
|
394
|
-
# @return [Time]
|
385
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
395
386
|
def date_created
|
396
387
|
@properties['date_created']
|
397
388
|
end
|
398
389
|
|
399
390
|
##
|
400
|
-
# @return [String] Date when the media processing task finished
|
391
|
+
# @return [String] Date when the media processing task finished
|
401
392
|
def date_completed
|
402
393
|
@properties['date_completed']
|
403
394
|
end
|
404
395
|
|
405
396
|
##
|
406
|
-
# @return [String]
|
397
|
+
# @return [String] The ISO 8601 date and time in GMT when the composition generated media was deleted
|
407
398
|
def date_deleted
|
408
399
|
@properties['date_deleted']
|
409
400
|
end
|
410
401
|
|
411
402
|
##
|
412
|
-
# @return [String]
|
403
|
+
# @return [String] The unique string that identifies the resource
|
413
404
|
def sid
|
414
405
|
@properties['sid']
|
415
406
|
end
|
416
407
|
|
417
408
|
##
|
418
|
-
# @return [String]
|
409
|
+
# @return [String] The SID of the Group Room that generated the audio and video tracks used in the composition
|
419
410
|
def room_sid
|
420
411
|
@properties['room_sid']
|
421
412
|
end
|
422
413
|
|
423
414
|
##
|
424
|
-
# @return [String]
|
415
|
+
# @return [String] The array of track names to include in the composition
|
425
416
|
def audio_sources
|
426
417
|
@properties['audio_sources']
|
427
418
|
end
|
428
419
|
|
429
420
|
##
|
430
|
-
# @return [String]
|
421
|
+
# @return [String] The array of track names to exclude from the composition
|
431
422
|
def audio_sources_excluded
|
432
423
|
@properties['audio_sources_excluded']
|
433
424
|
end
|
434
425
|
|
435
426
|
##
|
436
|
-
# @return [Hash]
|
427
|
+
# @return [Hash] An object that describes the video layout of the composition
|
437
428
|
def video_layout
|
438
429
|
@properties['video_layout']
|
439
430
|
end
|
440
431
|
|
441
432
|
##
|
442
|
-
# @return [String]
|
433
|
+
# @return [String] The dimensions of the video image in pixels expressed as columns (width) and rows (height)
|
443
434
|
def resolution
|
444
435
|
@properties['resolution']
|
445
436
|
end
|
446
437
|
|
447
438
|
##
|
448
|
-
# @return [Boolean]
|
439
|
+
# @return [Boolean] Whether to remove intervals with no media
|
449
440
|
def trim
|
450
441
|
@properties['trim']
|
451
442
|
end
|
452
443
|
|
453
444
|
##
|
454
|
-
# @return [composition.Format] The
|
445
|
+
# @return [composition.Format] The container format of the composition's media files as specified in the POST request that created the Composition resource
|
455
446
|
def format
|
456
447
|
@properties['format']
|
457
448
|
end
|
458
449
|
|
459
450
|
##
|
460
|
-
# @return [String] The
|
451
|
+
# @return [String] The average bit rate of the composition's media
|
461
452
|
def bitrate
|
462
453
|
@properties['bitrate']
|
463
454
|
end
|
464
455
|
|
465
456
|
##
|
466
|
-
# @return [String]
|
457
|
+
# @return [String] The size of the composed media file in bytes
|
467
458
|
def size
|
468
459
|
@properties['size']
|
469
460
|
end
|
470
461
|
|
471
462
|
##
|
472
|
-
# @return [String]
|
463
|
+
# @return [String] The duration of the composition's media file in seconds
|
473
464
|
def duration
|
474
465
|
@properties['duration']
|
475
466
|
end
|
476
467
|
|
477
468
|
##
|
478
|
-
# @return [String] The absolute URL
|
469
|
+
# @return [String] The absolute URL of the resource
|
479
470
|
def url
|
480
471
|
@properties['url']
|
481
472
|
end
|
482
473
|
|
483
474
|
##
|
484
|
-
# @return [String]
|
475
|
+
# @return [String] The URL of the media file associated with the composition
|
485
476
|
def links
|
486
477
|
@properties['links']
|
487
478
|
end
|
@@ -29,18 +29,17 @@ module Twilio
|
|
29
29
|
# Lists CompositionHookInstance records from the API as a list.
|
30
30
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
31
|
# memory before returning.
|
32
|
-
# @param [Boolean] enabled
|
33
|
-
#
|
34
|
-
# @param [Time] date_created_after
|
35
|
-
#
|
36
|
-
#
|
37
|
-
# @param [Time] date_created_before
|
38
|
-
# this
|
39
|
-
#
|
40
|
-
# @param [String] friendly_name
|
41
|
-
# that match this
|
42
|
-
#
|
43
|
-
# `*my*hook*`).
|
32
|
+
# @param [Boolean] enabled Read only CompositionHook resources with an `enabled`
|
33
|
+
# value that matches this parameter.
|
34
|
+
# @param [Time] date_created_after Read only CompositionHook resources created on
|
35
|
+
# or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with
|
36
|
+
# time zone.
|
37
|
+
# @param [Time] date_created_before Read only CompositionHook resources created
|
38
|
+
# before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with
|
39
|
+
# time zone.
|
40
|
+
# @param [String] friendly_name Read only CompositionHook resources with friendly
|
41
|
+
# names that match this string. The match is not case sensitive and can include
|
42
|
+
# asterisk `*` characters as wildcard match.
|
44
43
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
45
44
|
# guarantees to never return more than limit. Default is no limit
|
46
45
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -63,18 +62,17 @@ module Twilio
|
|
63
62
|
# Streams CompositionHookInstance records from the API as an Enumerable.
|
64
63
|
# This operation lazily loads records as efficiently as possible until the limit
|
65
64
|
# is reached.
|
66
|
-
# @param [Boolean] enabled
|
67
|
-
#
|
68
|
-
# @param [Time] date_created_after
|
69
|
-
#
|
70
|
-
#
|
71
|
-
# @param [Time] date_created_before
|
72
|
-
# this
|
73
|
-
#
|
74
|
-
# @param [String] friendly_name
|
75
|
-
# that match this
|
76
|
-
#
|
77
|
-
# `*my*hook*`).
|
65
|
+
# @param [Boolean] enabled Read only CompositionHook resources with an `enabled`
|
66
|
+
# value that matches this parameter.
|
67
|
+
# @param [Time] date_created_after Read only CompositionHook resources created on
|
68
|
+
# or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with
|
69
|
+
# time zone.
|
70
|
+
# @param [Time] date_created_before Read only CompositionHook resources created
|
71
|
+
# before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with
|
72
|
+
# time zone.
|
73
|
+
# @param [String] friendly_name Read only CompositionHook resources with friendly
|
74
|
+
# names that match this string. The match is not case sensitive and can include
|
75
|
+
# asterisk `*` characters as wildcard match.
|
78
76
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
79
77
|
# guarantees to never return more than limit. Default is no limit.
|
80
78
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -113,18 +111,17 @@ module Twilio
|
|
113
111
|
##
|
114
112
|
# Retrieve a single page of CompositionHookInstance records from the API.
|
115
113
|
# Request is executed immediately.
|
116
|
-
# @param [Boolean] enabled
|
117
|
-
#
|
118
|
-
# @param [Time] date_created_after
|
119
|
-
#
|
120
|
-
#
|
121
|
-
# @param [Time] date_created_before
|
122
|
-
# this
|
123
|
-
#
|
124
|
-
# @param [String] friendly_name
|
125
|
-
# that match this
|
126
|
-
#
|
127
|
-
# `*my*hook*`).
|
114
|
+
# @param [Boolean] enabled Read only CompositionHook resources with an `enabled`
|
115
|
+
# value that matches this parameter.
|
116
|
+
# @param [Time] date_created_after Read only CompositionHook resources created on
|
117
|
+
# or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with
|
118
|
+
# time zone.
|
119
|
+
# @param [Time] date_created_before Read only CompositionHook resources created
|
120
|
+
# before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with
|
121
|
+
# time zone.
|
122
|
+
# @param [String] friendly_name Read only CompositionHook resources with friendly
|
123
|
+
# names that match this string. The match is not case sensitive and can include
|
124
|
+
# asterisk `*` characters as wildcard match.
|
128
125
|
# @param [String] page_token PageToken provided by the API
|
129
126
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
130
127
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -163,33 +160,37 @@ module Twilio
|
|
163
160
|
##
|
164
161
|
# Retrieve a single page of CompositionHookInstance records from the API.
|
165
162
|
# Request is executed immediately.
|
166
|
-
# @param [String] friendly_name
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
170
|
-
# will be triggered for every completed Group Room
|
171
|
-
# the
|
172
|
-
# @param [Hash] video_layout
|
173
|
-
#
|
174
|
-
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for
|
175
|
-
# @param [String] audio_sources An array of
|
176
|
-
#
|
177
|
-
# more
|
178
|
-
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
184
|
-
#
|
185
|
-
#
|
186
|
-
#
|
187
|
-
#
|
188
|
-
#
|
163
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
164
|
+
# the resource. It can be up to 100 characters long and it must be unique within
|
165
|
+
# the account.
|
166
|
+
# @param [Boolean] enabled Whether the composition hook is active. When `true`,
|
167
|
+
# the composition hook will be triggered for every completed Group Room in the
|
168
|
+
# account. When `false`, the composition hook will never be triggered.
|
169
|
+
# @param [Hash] video_layout An object that describes the video layout of the
|
170
|
+
# composition hook in terms of regions. See [Specifying Video
|
171
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
172
|
+
# @param [String] audio_sources An array of track names from the same group room
|
173
|
+
# to merge into the compositions created by the composition hook. Can include zero
|
174
|
+
# or more track names. A composition triggered by the composition hook includes
|
175
|
+
# all audio sources specified in `audio_sources` except those specified in
|
176
|
+
# `audio_sources_excluded`. The track names in this parameter can include an
|
177
|
+
# asterisk as a wild card character, which matches zero or more characters in a
|
178
|
+
# track name. For example, `student*` includes tracks named `student` as well as
|
179
|
+
# `studentTeam`.
|
180
|
+
# @param [String] audio_sources_excluded An array of track names to exclude. A
|
181
|
+
# composition triggered by the composition hook includes all audio sources
|
182
|
+
# specified in `audio_sources` except for those specified in
|
183
|
+
# `audio_sources_excluded`. The track names in this parameter can include an
|
184
|
+
# asterisk as a wild card character, which matches zero or more characters in a
|
185
|
+
# track name. For example, `student*` excludes `student` as well as `studentTeam`.
|
186
|
+
# This parameter can also be empty.
|
187
|
+
# @param [String] resolution A string that describes the columns (width) and rows
|
188
|
+
# (height) of the generated composed video in pixels. Defaults to `640x480`.
|
189
|
+
# The string's format is `{width}x{height}` where:
|
189
190
|
#
|
190
|
-
# *
|
191
|
-
# *
|
192
|
-
# * `width * height <= 921,600
|
191
|
+
# * 16 <= `{width}` <= 1280
|
192
|
+
# * 16 <= `{height}` <= 1280
|
193
|
+
# * `{width}` * `{height}` <= 921,600
|
193
194
|
#
|
194
195
|
# Typical values are:
|
195
196
|
#
|
@@ -198,28 +199,28 @@ module Twilio
|
|
198
199
|
# * VGA = `640x480`
|
199
200
|
# * CIF = `320x240`
|
200
201
|
#
|
201
|
-
# Note that the `
|
202
|
-
#
|
203
|
-
#
|
204
|
-
#
|
205
|
-
#
|
206
|
-
#
|
207
|
-
#
|
208
|
-
#
|
209
|
-
# `
|
210
|
-
#
|
211
|
-
#
|
212
|
-
#
|
213
|
-
#
|
214
|
-
# @param [String] status_callback_method HTTP method
|
215
|
-
#
|
216
|
-
# @param [Boolean] trim
|
217
|
-
#
|
218
|
-
#
|
219
|
-
#
|
220
|
-
# later
|
221
|
-
#
|
222
|
-
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts)
|
202
|
+
# Note that the `resolution` imposes an aspect ratio to the resulting composition.
|
203
|
+
# When the original video tracks are constrained by the aspect ratio, they are
|
204
|
+
# scaled to fit. See [Specifying Video
|
205
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
206
|
+
# @param [composition_hook.Format] format The container format of the media files
|
207
|
+
# used by the compositions created by the composition hook. Can be: `mp4` or
|
208
|
+
# `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have
|
209
|
+
# one or more tracks and/or a `video_layout` element must contain a valid
|
210
|
+
# `video_sources` list, otherwise an error occurs.
|
211
|
+
# @param [String] status_callback The URL we should call using the
|
212
|
+
# `status_callback_method` to send status information to your application on every
|
213
|
+
# composition event. If not provided, status callback events will not be
|
214
|
+
# dispatched.
|
215
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
216
|
+
# `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
|
217
|
+
# @param [Boolean] trim Whether to clip the intervals where there is no active
|
218
|
+
# media in the Compositions triggered by the composition hook. The default is
|
219
|
+
# `true`. Compositions with `trim` enabled are shorter when the Room is created
|
220
|
+
# and no Participant joins for a while as well as if all the Participants leave
|
221
|
+
# the room and join later, because those gaps will be removed. See [Specifying
|
222
|
+
# Video
|
223
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
223
224
|
# @return [CompositionHookInstance] Newly created CompositionHookInstance
|
224
225
|
def create(friendly_name: nil, enabled: :unset, video_layout: :unset, audio_sources: :unset, audio_sources_excluded: :unset, resolution: :unset, format: :unset, status_callback: :unset, status_callback_method: :unset, trim: :unset)
|
225
226
|
data = Twilio::Values.of({
|
@@ -288,8 +289,7 @@ module Twilio
|
|
288
289
|
##
|
289
290
|
# Initialize the CompositionHookContext
|
290
291
|
# @param [Version] version Version that contains the resource
|
291
|
-
# @param [String] sid The
|
292
|
-
# Composition Hook to fetch.
|
292
|
+
# @param [String] sid The SID of the CompositionHook resource to fetch.
|
293
293
|
# @return [CompositionHookContext] CompositionHookContext
|
294
294
|
def initialize(version, sid)
|
295
295
|
super(version)
|
@@ -323,52 +323,67 @@ module Twilio
|
|
323
323
|
|
324
324
|
##
|
325
325
|
# Update the CompositionHookInstance
|
326
|
-
# @param [String] friendly_name
|
327
|
-
#
|
328
|
-
#
|
329
|
-
#
|
330
|
-
# will be triggered for every completed Group Room
|
331
|
-
# the
|
332
|
-
# @param [Hash] video_layout A JSON object
|
333
|
-
#
|
334
|
-
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for
|
335
|
-
# @param [String] audio_sources An array of
|
336
|
-
#
|
337
|
-
# more
|
338
|
-
#
|
339
|
-
#
|
340
|
-
#
|
341
|
-
#
|
342
|
-
#
|
343
|
-
#
|
344
|
-
#
|
345
|
-
#
|
346
|
-
#
|
347
|
-
#
|
348
|
-
#
|
349
|
-
#
|
350
|
-
#
|
351
|
-
#
|
352
|
-
#
|
353
|
-
#
|
354
|
-
#
|
355
|
-
#
|
356
|
-
#
|
357
|
-
# @param [
|
358
|
-
#
|
359
|
-
#
|
360
|
-
#
|
361
|
-
#
|
362
|
-
#
|
363
|
-
#
|
364
|
-
#
|
365
|
-
#
|
366
|
-
#
|
367
|
-
#
|
368
|
-
#
|
369
|
-
#
|
370
|
-
#
|
371
|
-
#
|
326
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
327
|
+
# the resource. It can be up to 100 characters long and it must be unique within
|
328
|
+
# the account.
|
329
|
+
# @param [Boolean] enabled Whether the composition hook is active. When `true`,
|
330
|
+
# the composition hook will be triggered for every completed Group Room in the
|
331
|
+
# account. When `false`, the composition hook never triggers.
|
332
|
+
# @param [Hash] video_layout A JSON object that describes the video layout of the
|
333
|
+
# composition hook in terms of regions. See [Specifying Video
|
334
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
335
|
+
# @param [String] audio_sources An array of track names from the same group room
|
336
|
+
# to merge into the compositions created by the composition hook. Can include zero
|
337
|
+
# or more track names. A composition triggered by the composition hook includes
|
338
|
+
# all audio sources specified in `audio_sources` except those specified in
|
339
|
+
# `audio_sources_excluded`. The track names in this parameter can include an
|
340
|
+
# asterisk as a wild card character, which matches zero or more characters in a
|
341
|
+
# track name. For example, `student*` includes tracks named `student` as well as
|
342
|
+
# `studentTeam`.
|
343
|
+
# @param [String] audio_sources_excluded An array of track names to exclude. A
|
344
|
+
# composition triggered by the composition hook includes all audio sources
|
345
|
+
# specified in `audio_sources` except for those specified in
|
346
|
+
# `audio_sources_excluded`. The track names in this parameter can include an
|
347
|
+
# asterisk as a wild card character, which matches zero or more characters in a
|
348
|
+
# track name. For example, `student*` excludes `student` as well as `studentTeam`.
|
349
|
+
# This parameter can also be empty.
|
350
|
+
# @param [Boolean] trim Whether to clip the intervals where there is no active
|
351
|
+
# media in the compositions triggered by the composition hook. The default is
|
352
|
+
# `true`. Compositions with `trim` enabled are shorter when the Room is created
|
353
|
+
# and no Participant joins for a while as well as if all the Participants leave
|
354
|
+
# the room and join later, because those gaps will be removed. See [Specifying
|
355
|
+
# Video
|
356
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
357
|
+
# @param [composition_hook.Format] format The container format of the media files
|
358
|
+
# used by the compositions created by the composition hook. Can be: `mp4` or
|
359
|
+
# `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have
|
360
|
+
# one or more tracks and/or a `video_layout` element must contain a valid
|
361
|
+
# `video_sources` list, otherwise an error occurs.
|
362
|
+
# @param [String] resolution A string that describes the columns (width) and rows
|
363
|
+
# (height) of the generated composed video in pixels. Defaults to `640x480`.
|
364
|
+
# The string's format is `{width}x{height}` where:
|
365
|
+
#
|
366
|
+
# * 16 <= `{width}` <= 1280
|
367
|
+
# * 16 <= `{height}` <= 1280
|
368
|
+
# * `{width}` * `{height}` <= 921,600
|
369
|
+
#
|
370
|
+
# Typical values are:
|
371
|
+
#
|
372
|
+
# * HD = `1280x720`
|
373
|
+
# * PAL = `1024x576`
|
374
|
+
# * VGA = `640x480`
|
375
|
+
# * CIF = `320x240`
|
376
|
+
#
|
377
|
+
# Note that the `resolution` imposes an aspect ratio to the resulting composition.
|
378
|
+
# When the original video tracks are constrained by the aspect ratio, they are
|
379
|
+
# scaled to fit. See [Specifying Video
|
380
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
381
|
+
# @param [String] status_callback The URL we should call using the
|
382
|
+
# `status_callback_method` to send status information to your application on every
|
383
|
+
# composition event. If not provided, status callback events will not be
|
384
|
+
# dispatched.
|
385
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
386
|
+
# `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
|
372
387
|
# @return [CompositionHookInstance] Updated CompositionHookInstance
|
373
388
|
def update(friendly_name: nil, enabled: :unset, video_layout: :unset, audio_sources: :unset, audio_sources_excluded: :unset, trim: :unset, format: :unset, resolution: :unset, status_callback: :unset, status_callback_method: :unset)
|
374
389
|
data = Twilio::Values.of({
|
@@ -415,8 +430,7 @@ module Twilio
|
|
415
430
|
# Initialize the CompositionHookInstance
|
416
431
|
# @param [Version] version Version that contains the resource
|
417
432
|
# @param [Hash] payload payload that contains response from Twilio
|
418
|
-
# @param [String] sid The
|
419
|
-
# Composition Hook to fetch.
|
433
|
+
# @param [String] sid The SID of the CompositionHook resource to fetch.
|
420
434
|
# @return [CompositionHookInstance] CompositionHookInstance
|
421
435
|
def initialize(version, payload, sid: nil)
|
422
436
|
super(version)
|
@@ -457,91 +471,91 @@ module Twilio
|
|
457
471
|
end
|
458
472
|
|
459
473
|
##
|
460
|
-
# @return [String]
|
474
|
+
# @return [String] The SID of the Account that created the resource
|
461
475
|
def account_sid
|
462
476
|
@properties['account_sid']
|
463
477
|
end
|
464
478
|
|
465
479
|
##
|
466
|
-
# @return [String]
|
480
|
+
# @return [String] The string that you assigned to describe the resource
|
467
481
|
def friendly_name
|
468
482
|
@properties['friendly_name']
|
469
483
|
end
|
470
484
|
|
471
485
|
##
|
472
|
-
# @return [Boolean]
|
486
|
+
# @return [Boolean] Whether the CompositionHook is active
|
473
487
|
def enabled
|
474
488
|
@properties['enabled']
|
475
489
|
end
|
476
490
|
|
477
491
|
##
|
478
|
-
# @return [Time]
|
492
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
479
493
|
def date_created
|
480
494
|
@properties['date_created']
|
481
495
|
end
|
482
496
|
|
483
497
|
##
|
484
|
-
# @return [String]
|
498
|
+
# @return [String] The ISO 8601 date and time in GMT when the resource was last updated
|
485
499
|
def date_updated
|
486
500
|
@properties['date_updated']
|
487
501
|
end
|
488
502
|
|
489
503
|
##
|
490
|
-
# @return [String]
|
504
|
+
# @return [String] The unique string that identifies the resource
|
491
505
|
def sid
|
492
506
|
@properties['sid']
|
493
507
|
end
|
494
508
|
|
495
509
|
##
|
496
|
-
# @return [String]
|
510
|
+
# @return [String] The array of track names to include in the compositions created by the composition hook
|
497
511
|
def audio_sources
|
498
512
|
@properties['audio_sources']
|
499
513
|
end
|
500
514
|
|
501
515
|
##
|
502
|
-
# @return [String]
|
516
|
+
# @return [String] The array of track names to exclude from the compositions created by the composition hook
|
503
517
|
def audio_sources_excluded
|
504
518
|
@properties['audio_sources_excluded']
|
505
519
|
end
|
506
520
|
|
507
521
|
##
|
508
|
-
# @return [Hash]
|
522
|
+
# @return [Hash] A JSON object that describes the video layout of the Composition
|
509
523
|
def video_layout
|
510
524
|
@properties['video_layout']
|
511
525
|
end
|
512
526
|
|
513
527
|
##
|
514
|
-
# @return [String]
|
528
|
+
# @return [String] The dimensions of the video image in pixels expressed as columns (width) and rows (height)
|
515
529
|
def resolution
|
516
530
|
@properties['resolution']
|
517
531
|
end
|
518
532
|
|
519
533
|
##
|
520
|
-
# @return [Boolean]
|
534
|
+
# @return [Boolean] Whether intervals with no media are clipped
|
521
535
|
def trim
|
522
536
|
@properties['trim']
|
523
537
|
end
|
524
538
|
|
525
539
|
##
|
526
|
-
# @return [composition_hook.Format] The
|
540
|
+
# @return [composition_hook.Format] The container format of the media files used by the compositions created by the composition hook
|
527
541
|
def format
|
528
542
|
@properties['format']
|
529
543
|
end
|
530
544
|
|
531
545
|
##
|
532
|
-
# @return [String]
|
546
|
+
# @return [String] The URL to send status information to your application
|
533
547
|
def status_callback
|
534
548
|
@properties['status_callback']
|
535
549
|
end
|
536
550
|
|
537
551
|
##
|
538
|
-
# @return [String] HTTP method
|
552
|
+
# @return [String] The HTTP method we should use to call status_callback
|
539
553
|
def status_callback_method
|
540
554
|
@properties['status_callback_method']
|
541
555
|
end
|
542
556
|
|
543
557
|
##
|
544
|
-
# @return [String] The absolute URL
|
558
|
+
# @return [String] The absolute URL of the resource
|
545
559
|
def url
|
546
560
|
@properties['url']
|
547
561
|
end
|
@@ -562,52 +576,67 @@ module Twilio
|
|
562
576
|
|
563
577
|
##
|
564
578
|
# Update the CompositionHookInstance
|
565
|
-
# @param [String] friendly_name
|
566
|
-
#
|
567
|
-
#
|
568
|
-
#
|
569
|
-
# will be triggered for every completed Group Room
|
570
|
-
# the
|
571
|
-
# @param [Hash] video_layout A JSON object
|
572
|
-
#
|
573
|
-
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for
|
574
|
-
# @param [String] audio_sources An array of
|
575
|
-
#
|
576
|
-
# more
|
577
|
-
#
|
578
|
-
#
|
579
|
-
#
|
580
|
-
#
|
581
|
-
#
|
582
|
-
#
|
583
|
-
#
|
584
|
-
#
|
585
|
-
#
|
586
|
-
#
|
587
|
-
#
|
588
|
-
#
|
589
|
-
#
|
590
|
-
#
|
591
|
-
#
|
592
|
-
#
|
593
|
-
#
|
594
|
-
#
|
595
|
-
#
|
596
|
-
# @param [
|
597
|
-
#
|
598
|
-
#
|
599
|
-
#
|
600
|
-
#
|
601
|
-
#
|
602
|
-
#
|
603
|
-
#
|
604
|
-
#
|
605
|
-
#
|
606
|
-
#
|
607
|
-
#
|
608
|
-
#
|
609
|
-
#
|
610
|
-
#
|
579
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
580
|
+
# the resource. It can be up to 100 characters long and it must be unique within
|
581
|
+
# the account.
|
582
|
+
# @param [Boolean] enabled Whether the composition hook is active. When `true`,
|
583
|
+
# the composition hook will be triggered for every completed Group Room in the
|
584
|
+
# account. When `false`, the composition hook never triggers.
|
585
|
+
# @param [Hash] video_layout A JSON object that describes the video layout of the
|
586
|
+
# composition hook in terms of regions. See [Specifying Video
|
587
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
588
|
+
# @param [String] audio_sources An array of track names from the same group room
|
589
|
+
# to merge into the compositions created by the composition hook. Can include zero
|
590
|
+
# or more track names. A composition triggered by the composition hook includes
|
591
|
+
# all audio sources specified in `audio_sources` except those specified in
|
592
|
+
# `audio_sources_excluded`. The track names in this parameter can include an
|
593
|
+
# asterisk as a wild card character, which matches zero or more characters in a
|
594
|
+
# track name. For example, `student*` includes tracks named `student` as well as
|
595
|
+
# `studentTeam`.
|
596
|
+
# @param [String] audio_sources_excluded An array of track names to exclude. A
|
597
|
+
# composition triggered by the composition hook includes all audio sources
|
598
|
+
# specified in `audio_sources` except for those specified in
|
599
|
+
# `audio_sources_excluded`. The track names in this parameter can include an
|
600
|
+
# asterisk as a wild card character, which matches zero or more characters in a
|
601
|
+
# track name. For example, `student*` excludes `student` as well as `studentTeam`.
|
602
|
+
# This parameter can also be empty.
|
603
|
+
# @param [Boolean] trim Whether to clip the intervals where there is no active
|
604
|
+
# media in the compositions triggered by the composition hook. The default is
|
605
|
+
# `true`. Compositions with `trim` enabled are shorter when the Room is created
|
606
|
+
# and no Participant joins for a while as well as if all the Participants leave
|
607
|
+
# the room and join later, because those gaps will be removed. See [Specifying
|
608
|
+
# Video
|
609
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
610
|
+
# @param [composition_hook.Format] format The container format of the media files
|
611
|
+
# used by the compositions created by the composition hook. Can be: `mp4` or
|
612
|
+
# `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have
|
613
|
+
# one or more tracks and/or a `video_layout` element must contain a valid
|
614
|
+
# `video_sources` list, otherwise an error occurs.
|
615
|
+
# @param [String] resolution A string that describes the columns (width) and rows
|
616
|
+
# (height) of the generated composed video in pixels. Defaults to `640x480`.
|
617
|
+
# The string's format is `{width}x{height}` where:
|
618
|
+
#
|
619
|
+
# * 16 <= `{width}` <= 1280
|
620
|
+
# * 16 <= `{height}` <= 1280
|
621
|
+
# * `{width}` * `{height}` <= 921,600
|
622
|
+
#
|
623
|
+
# Typical values are:
|
624
|
+
#
|
625
|
+
# * HD = `1280x720`
|
626
|
+
# * PAL = `1024x576`
|
627
|
+
# * VGA = `640x480`
|
628
|
+
# * CIF = `320x240`
|
629
|
+
#
|
630
|
+
# Note that the `resolution` imposes an aspect ratio to the resulting composition.
|
631
|
+
# When the original video tracks are constrained by the aspect ratio, they are
|
632
|
+
# scaled to fit. See [Specifying Video
|
633
|
+
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
|
634
|
+
# @param [String] status_callback The URL we should call using the
|
635
|
+
# `status_callback_method` to send status information to your application on every
|
636
|
+
# composition event. If not provided, status callback events will not be
|
637
|
+
# dispatched.
|
638
|
+
# @param [String] status_callback_method The HTTP method we should use to call
|
639
|
+
# `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
|
611
640
|
# @return [CompositionHookInstance] Updated CompositionHookInstance
|
612
641
|
def update(friendly_name: nil, enabled: :unset, video_layout: :unset, audio_sources: :unset, audio_sources_excluded: :unset, trim: :unset, format: :unset, resolution: :unset, status_callback: :unset, status_callback_method: :unset)
|
613
642
|
context.update(
|