twilio-ruby 5.10.1 → 5.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +6 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +1 -3
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +14 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +43 -9
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/studio/v1/flow/engagement_spec.rb +28 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8f3bb7818ab79d0310f3aa52a686aa21a0404c0
|
4
|
+
data.tar.gz: f21379efc9736fc94cff5e7d456730b19284313e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0368ed2a1c4b9cdd40ed62e86e59e5aeac6fc4db02e48c4d9b935923f4e1f64cd45ad0202442b586002cb23e403eb4e60d29a817df90085c75fde850ef09a7b
|
7
|
+
data.tar.gz: 8f713191f1498c852389dd3b3d683c14367fb7302bc56ebe17100696c226a5f0deb31d70491ccdbdd73e887a636540a76cbb939ccc544d881cb7263c3222c7cd
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
|
|
27
27
|
To install using [Bundler][bundler] grab the latest stable version:
|
28
28
|
|
29
29
|
```ruby
|
30
|
-
gem 'twilio-ruby', '~> 5.10.
|
30
|
+
gem 'twilio-ruby', '~> 5.10.2'
|
31
31
|
```
|
32
32
|
|
33
33
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
34
34
|
|
35
35
|
```bash
|
36
|
-
gem install twilio-ruby -v 5.10.
|
36
|
+
gem install twilio-ruby -v 5.10.2
|
37
37
|
```
|
38
38
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
@@ -70,9 +70,7 @@ module Twilio
|
|
70
70
|
# to URL-encode this string, since the '`#`' character has special meaning in a
|
71
71
|
# URL. If both `SendDigits` and `MachineDetection` parameters are provided, then
|
72
72
|
# `MachineDetection` will be ignored.
|
73
|
-
# @param [String] if_machine
|
74
|
-
# voicemail) or a human has answered the call. Possible value are `Continue` and
|
75
|
-
# `Hangup`.
|
73
|
+
# @param [String] if_machine The if_machine
|
76
74
|
# @param [String] timeout The integer number of seconds that Twilio should allow
|
77
75
|
# the phone to ring before assuming there is no answer. Default is `60` seconds,
|
78
76
|
# the maximum is `600` seconds. For some call flows Twilio will add a 5 second
|
@@ -206,6 +206,13 @@ module Twilio
|
|
206
206
|
EngagementInstance.new(@version, payload, flow_sid: @solution[:flow_sid], sid: @solution[:sid], )
|
207
207
|
end
|
208
208
|
|
209
|
+
##
|
210
|
+
# Deletes the EngagementInstance
|
211
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
212
|
+
def delete
|
213
|
+
@version.delete('delete', @uri)
|
214
|
+
end
|
215
|
+
|
209
216
|
##
|
210
217
|
# Access the steps
|
211
218
|
# @return [StepList]
|
@@ -357,6 +364,13 @@ module Twilio
|
|
357
364
|
context.fetch
|
358
365
|
end
|
359
366
|
|
367
|
+
##
|
368
|
+
# Deletes the EngagementInstance
|
369
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
370
|
+
def delete
|
371
|
+
context.delete
|
372
|
+
end
|
373
|
+
|
360
374
|
##
|
361
375
|
# Access the steps
|
362
376
|
# @return [steps] steps
|
@@ -145,15 +145,49 @@ module Twilio
|
|
145
145
|
##
|
146
146
|
# Retrieve a single page of CompositionInstance records from the API.
|
147
147
|
# Request is executed immediately.
|
148
|
-
# @param [String] room_sid
|
149
|
-
#
|
150
|
-
# @param [
|
151
|
-
#
|
152
|
-
#
|
153
|
-
# @param [
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
148
|
+
# @param [String] room_sid Group Room SID owning the media tracks to be used as
|
149
|
+
# Composition sources.
|
150
|
+
# @param [Hash] video_layout A JSON object defining the video layout of the
|
151
|
+
# Composition in terms of regions. See the section [Managing Video
|
152
|
+
# Layouts](#managing-video-layouts) below for further information.
|
153
|
+
# @param [String] audio_sources An array of audio sources to merge. All the
|
154
|
+
# specified sources must belong to the same Group Room. It can
|
155
|
+
# include:<ul><li>Zero or more `RecordingTrackSid`</li><li>Zero or more
|
156
|
+
# `MediaTrackSid`</li><li>Zero or more `ParticipantSid`</li><li>Zero or more Track
|
157
|
+
# names. These can be specified using wildcards (e.g. `student*`)</li></ul>
|
158
|
+
# @param [String] audio_sources_excluded An array of audio sources to exclude from
|
159
|
+
# the Composition. Any new Composition shall include all audio sources specified
|
160
|
+
# in `AudioSources` except for the ones specified in `AudioSourcesExcluded`. This
|
161
|
+
# parameter may include:<ul><li>Zero or more `RecordingTrackSid`</li><li>Zero or
|
162
|
+
# more `MediaTrackSid`</li><li>Zero or more `ParticipantSid`</li><li>Zero or more
|
163
|
+
# Track names. These can be specified using wildcards (e.g. `student*`)</li></ul>
|
164
|
+
# @param [String] resolution A string representing the numbers of pixels for rows
|
165
|
+
# (width) and columns (height) of the generated composed video. This string must
|
166
|
+
# have the format `{width}x{height}`. This parameter must comply with the
|
167
|
+
# following constraints:<ul><li>`width >= 16 && width <= 1280`</li><li>`height >=
|
168
|
+
# 16 && height <= 1280`</li><li>`width * height <= 921,600`</li></ul>Typical
|
169
|
+
# values are:<ul><li>HD = `1280x720`</li><li>PAL = `1024x576`</li><li>VGA =
|
170
|
+
# `640x480`</li><li>CIF = `320x240`</li></ul>Note that the `Resolution` implicitly
|
171
|
+
# imposes an aspect ratio to the resulting composition. When the original video
|
172
|
+
# tracks get constrained by this aspect ratio they are scaled-down to fit. You can
|
173
|
+
# find detailed information in the [Managing Video
|
174
|
+
# Layouts](#managing-video-layouts) section. Defaults to `640x480`.
|
175
|
+
# @param [composition.Format] format Container format of the Composition media
|
176
|
+
# file. Can be any of the following: `mp4`, `webm`. The use of `mp4` or `webm`
|
177
|
+
# makes mandatory the specification of `AudioSources` and/or one `VideoLayout`
|
178
|
+
# element containing a valid `video_sources` list, otherwise an error is fired.
|
179
|
+
# Defaults to `webm`.
|
180
|
+
# @param [String] status_callback A URL that Twilio sends asynchronous webhook
|
181
|
+
# requests to on every composition event. If not provided, status callback events
|
182
|
+
# will not be dispatched.
|
183
|
+
# @param [String] status_callback_method HTTP method Twilio should use when
|
184
|
+
# requesting the above URL. Defaults to `POST`.
|
185
|
+
# @param [Boolean] trim When activated, clips all the Composition intervals where
|
186
|
+
# there is no active media. This results in shorter compositions in cases when the
|
187
|
+
# Room was created but no Participant joined for some time, or if all the
|
188
|
+
# Participants left the room and joined at a later stage, as those gaps will be
|
189
|
+
# removed. You can find further information in the [Managing Video
|
190
|
+
# Layouts](#managing-video-layouts) section. Defaults to `true`.
|
157
191
|
# @return [CompositionInstance] Newly created CompositionInstance
|
158
192
|
def create(room_sid: :unset, video_layout: :unset, audio_sources: :unset, audio_sources_excluded: :unset, resolution: :unset, format: :unset, status_callback: :unset, status_callback_method: :unset, trim: :unset)
|
159
193
|
data = Twilio::Values.of({
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -140,4 +140,32 @@ describe 'Engagement' do
|
|
140
140
|
|
141
141
|
expect(actual).to_not eq(nil)
|
142
142
|
end
|
143
|
+
|
144
|
+
it "can delete" do
|
145
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
146
|
+
|
147
|
+
expect {
|
148
|
+
@client.studio.v1.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
149
|
+
.engagements('FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
150
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
151
|
+
|
152
|
+
values = {}
|
153
|
+
expect(
|
154
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
155
|
+
method: 'delete',
|
156
|
+
url: 'https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Engagements/FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
157
|
+
))).to eq(true)
|
158
|
+
end
|
159
|
+
|
160
|
+
it "receives delete responses" do
|
161
|
+
@holodeck.mock(Twilio::Response.new(
|
162
|
+
204,
|
163
|
+
nil,
|
164
|
+
))
|
165
|
+
|
166
|
+
actual = @client.studio.v1.flows('FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
167
|
+
.engagements('FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
168
|
+
|
169
|
+
expect(actual).to eq(true)
|
170
|
+
end
|
143
171
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.10.
|
4
|
+
version: 5.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|