twilio-ruby 5.6.1 → 5.6.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 +18 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/preview/studio/flow/engagement.rb +0 -14
- data/lib/twilio-ruby/rest/studio.rb +44 -0
- data/lib/twilio-ruby/rest/studio/v1.rb +41 -0
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +346 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +370 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +348 -0
- data/lib/twilio-ruby/rest/video.rb +8 -0
- data/lib/twilio-ruby/rest/video/v1.rb +15 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +425 -0
- data/lib/twilio-ruby/rest/video/v1/recording.rb +7 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +24 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +311 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/preview/studio/flow/engagement_spec.rb +0 -28
- data/spec/integration/studio/v1/flow/engagement/step_spec.rb +96 -0
- data/spec/integration/studio/v1/flow/engagement_spec.rb +143 -0
- data/spec/integration/studio/v1/flow_spec.rb +114 -0
- data/spec/integration/video/v1/composition_spec.rb +223 -0
- data/spec/integration/video/v1/recording_spec.rb +2 -0
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb +132 -0
- data/spec/integration/video/v1/room/room_participant_spec.rb +6 -3
- metadata +19 -2
@@ -0,0 +1,143 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
|
7
|
+
require 'spec_helper.rb'
|
8
|
+
|
9
|
+
describe 'Engagement' do
|
10
|
+
it "can read" do
|
11
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
12
|
+
|
13
|
+
expect {
|
14
|
+
@client.studio.v1.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
15
|
+
.engagements.list()
|
16
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
17
|
+
|
18
|
+
values = {}
|
19
|
+
expect(
|
20
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
21
|
+
method: 'get',
|
22
|
+
url: 'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements',
|
23
|
+
))).to eq(true)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "receives read_empty responses" do
|
27
|
+
@holodeck.mock(Twilio::Response.new(
|
28
|
+
200,
|
29
|
+
%q[
|
30
|
+
{
|
31
|
+
"meta": {
|
32
|
+
"previous_page_url": null,
|
33
|
+
"next_page_url": null,
|
34
|
+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements?PageSize=50&Page=0",
|
35
|
+
"page": 0,
|
36
|
+
"first_page_url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements?PageSize=50&Page=0",
|
37
|
+
"page_size": 50,
|
38
|
+
"key": "engagements"
|
39
|
+
},
|
40
|
+
"engagements": []
|
41
|
+
}
|
42
|
+
]
|
43
|
+
))
|
44
|
+
|
45
|
+
actual = @client.studio.v1.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
46
|
+
.engagements.list()
|
47
|
+
|
48
|
+
expect(actual).to_not eq(nil)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "can fetch" do
|
52
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
53
|
+
|
54
|
+
expect {
|
55
|
+
@client.studio.v1.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
56
|
+
.engagements("FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
57
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
58
|
+
|
59
|
+
values = {}
|
60
|
+
expect(
|
61
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
62
|
+
method: 'get',
|
63
|
+
url: 'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
64
|
+
))).to eq(true)
|
65
|
+
end
|
66
|
+
|
67
|
+
it "receives fetch responses" do
|
68
|
+
@holodeck.mock(Twilio::Response.new(
|
69
|
+
200,
|
70
|
+
%q[
|
71
|
+
{
|
72
|
+
"sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
73
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
74
|
+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
75
|
+
"contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
76
|
+
"contact_channel_address": "+14155555555",
|
77
|
+
"status": "ended",
|
78
|
+
"context": {},
|
79
|
+
"date_created": "2017-11-06T12:00:00Z",
|
80
|
+
"date_updated": null,
|
81
|
+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
82
|
+
"links": {
|
83
|
+
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps"
|
84
|
+
}
|
85
|
+
}
|
86
|
+
]
|
87
|
+
))
|
88
|
+
|
89
|
+
actual = @client.studio.v1.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
90
|
+
.engagements("FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
91
|
+
|
92
|
+
expect(actual).to_not eq(nil)
|
93
|
+
end
|
94
|
+
|
95
|
+
it "can create" do
|
96
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
97
|
+
|
98
|
+
expect {
|
99
|
+
@client.studio.v1.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
100
|
+
.engagements.create(to: "+15558675310", from: "+15017122661")
|
101
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
102
|
+
|
103
|
+
values = {'To' => "+15558675310", 'From' => "+15017122661", }
|
104
|
+
expect(
|
105
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
106
|
+
method: 'post',
|
107
|
+
url: 'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements',
|
108
|
+
data: values,
|
109
|
+
))).to eq(true)
|
110
|
+
end
|
111
|
+
|
112
|
+
it "receives create responses" do
|
113
|
+
@holodeck.mock(Twilio::Response.new(
|
114
|
+
201,
|
115
|
+
%q[
|
116
|
+
{
|
117
|
+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
118
|
+
"sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
119
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
120
|
+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
121
|
+
"context": {
|
122
|
+
"flow": {
|
123
|
+
"first_name": "Foo"
|
124
|
+
}
|
125
|
+
},
|
126
|
+
"contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
127
|
+
"contact_channel_address": "+18001234567",
|
128
|
+
"status": "active",
|
129
|
+
"date_created": "2015-07-30T20:00:00Z",
|
130
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
131
|
+
"links": {
|
132
|
+
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps"
|
133
|
+
}
|
134
|
+
}
|
135
|
+
]
|
136
|
+
))
|
137
|
+
|
138
|
+
actual = @client.studio.v1.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
|
139
|
+
.engagements.create(to: "+15558675310", from: "+15017122661")
|
140
|
+
|
141
|
+
expect(actual).to_not eq(nil)
|
142
|
+
end
|
143
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
|
7
|
+
require 'spec_helper.rb'
|
8
|
+
|
9
|
+
describe 'Flow' do
|
10
|
+
it "can read" do
|
11
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
12
|
+
|
13
|
+
expect {
|
14
|
+
@client.studio.v1.flows.list()
|
15
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
16
|
+
|
17
|
+
values = {}
|
18
|
+
expect(
|
19
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
20
|
+
method: 'get',
|
21
|
+
url: 'https://studio.twilio.com/v1/Flows',
|
22
|
+
))).to eq(true)
|
23
|
+
end
|
24
|
+
|
25
|
+
it "receives read_empty responses" do
|
26
|
+
@holodeck.mock(Twilio::Response.new(
|
27
|
+
200,
|
28
|
+
%q[
|
29
|
+
{
|
30
|
+
"meta": {
|
31
|
+
"previous_page_url": null,
|
32
|
+
"next_page_url": null,
|
33
|
+
"url": "https://studio.twilio.com/v1/Flows?PageSize=50&Page=0",
|
34
|
+
"page": 0,
|
35
|
+
"first_page_url": "https://studio.twilio.com/v1/Flows?PageSize=50&Page=0",
|
36
|
+
"page_size": 50,
|
37
|
+
"key": "flows"
|
38
|
+
},
|
39
|
+
"flows": []
|
40
|
+
}
|
41
|
+
]
|
42
|
+
))
|
43
|
+
|
44
|
+
actual = @client.studio.v1.flows.list()
|
45
|
+
|
46
|
+
expect(actual).to_not eq(nil)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "can fetch" do
|
50
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
51
|
+
|
52
|
+
expect {
|
53
|
+
@client.studio.v1.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
54
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
55
|
+
|
56
|
+
values = {}
|
57
|
+
expect(
|
58
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
59
|
+
method: 'get',
|
60
|
+
url: 'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
61
|
+
))).to eq(true)
|
62
|
+
end
|
63
|
+
|
64
|
+
it "receives fetch responses" do
|
65
|
+
@holodeck.mock(Twilio::Response.new(
|
66
|
+
200,
|
67
|
+
%q[
|
68
|
+
{
|
69
|
+
"sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
70
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
71
|
+
"friendly_name": "Test Flow",
|
72
|
+
"status": "published",
|
73
|
+
"version": 1,
|
74
|
+
"date_created": "2017-11-06T12:00:00Z",
|
75
|
+
"date_updated": null,
|
76
|
+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
77
|
+
"links": {
|
78
|
+
"engagements": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements"
|
79
|
+
}
|
80
|
+
}
|
81
|
+
]
|
82
|
+
))
|
83
|
+
|
84
|
+
actual = @client.studio.v1.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
85
|
+
|
86
|
+
expect(actual).to_not eq(nil)
|
87
|
+
end
|
88
|
+
|
89
|
+
it "can delete" do
|
90
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
91
|
+
|
92
|
+
expect {
|
93
|
+
@client.studio.v1.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
94
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
95
|
+
|
96
|
+
values = {}
|
97
|
+
expect(
|
98
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
99
|
+
method: 'delete',
|
100
|
+
url: 'https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
101
|
+
))).to eq(true)
|
102
|
+
end
|
103
|
+
|
104
|
+
it "receives delete responses" do
|
105
|
+
@holodeck.mock(Twilio::Response.new(
|
106
|
+
204,
|
107
|
+
nil,
|
108
|
+
))
|
109
|
+
|
110
|
+
actual = @client.studio.v1.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
111
|
+
|
112
|
+
expect(actual).to eq(true)
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,223 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
|
7
|
+
require 'spec_helper.rb'
|
8
|
+
|
9
|
+
describe 'Composition' do
|
10
|
+
it "can fetch" do
|
11
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
12
|
+
|
13
|
+
expect {
|
14
|
+
@client.video.v1.compositions("CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
15
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
16
|
+
|
17
|
+
values = {}
|
18
|
+
expect(
|
19
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
20
|
+
method: 'get',
|
21
|
+
url: 'https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
22
|
+
))).to eq(true)
|
23
|
+
end
|
24
|
+
|
25
|
+
it "receives fetch responses" do
|
26
|
+
@holodeck.mock(Twilio::Response.new(
|
27
|
+
200,
|
28
|
+
%q[
|
29
|
+
{
|
30
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
31
|
+
"status": "completed",
|
32
|
+
"date_created": "2015-07-30T20:00:00Z",
|
33
|
+
"date_completed": "2015-07-30T20:01:33Z",
|
34
|
+
"date_deleted": null,
|
35
|
+
"sid": "CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
36
|
+
"audio_sources": [
|
37
|
+
"RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
38
|
+
],
|
39
|
+
"video_sources": [
|
40
|
+
"RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
41
|
+
],
|
42
|
+
"video_layout": "GRID",
|
43
|
+
"resolution": "1280x720",
|
44
|
+
"format": "webm",
|
45
|
+
"bitrate": 64,
|
46
|
+
"size": 4,
|
47
|
+
"duration": 6,
|
48
|
+
"url": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
49
|
+
"links": {
|
50
|
+
"media": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
|
51
|
+
}
|
52
|
+
}
|
53
|
+
]
|
54
|
+
))
|
55
|
+
|
56
|
+
actual = @client.video.v1.compositions("CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
|
57
|
+
|
58
|
+
expect(actual).to_not eq(nil)
|
59
|
+
end
|
60
|
+
|
61
|
+
it "can read" do
|
62
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
63
|
+
|
64
|
+
expect {
|
65
|
+
@client.video.v1.compositions.list()
|
66
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
67
|
+
|
68
|
+
values = {}
|
69
|
+
expect(
|
70
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
71
|
+
method: 'get',
|
72
|
+
url: 'https://video.twilio.com/v1/Compositions',
|
73
|
+
))).to eq(true)
|
74
|
+
end
|
75
|
+
|
76
|
+
it "receives read_empty responses" do
|
77
|
+
@holodeck.mock(Twilio::Response.new(
|
78
|
+
200,
|
79
|
+
%q[
|
80
|
+
{
|
81
|
+
"compositions": [],
|
82
|
+
"meta": {
|
83
|
+
"page": 0,
|
84
|
+
"page_size": 50,
|
85
|
+
"first_page_url": "https://video.twilio.com/v1/Compositions?PageSize=50&Page=0",
|
86
|
+
"previous_page_url": null,
|
87
|
+
"url": "https://video.twilio.com/v1/Compositions?PageSize=50&Page=0",
|
88
|
+
"next_page_url": null,
|
89
|
+
"key": "compositions"
|
90
|
+
}
|
91
|
+
}
|
92
|
+
]
|
93
|
+
))
|
94
|
+
|
95
|
+
actual = @client.video.v1.compositions.list()
|
96
|
+
|
97
|
+
expect(actual).to_not eq(nil)
|
98
|
+
end
|
99
|
+
|
100
|
+
it "receives read_results responses" do
|
101
|
+
@holodeck.mock(Twilio::Response.new(
|
102
|
+
200,
|
103
|
+
%q[
|
104
|
+
{
|
105
|
+
"compositions": [
|
106
|
+
{
|
107
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
108
|
+
"status": "completed",
|
109
|
+
"date_created": "2015-07-30T20:00:00Z",
|
110
|
+
"date_completed": "2015-07-30T20:01:33Z",
|
111
|
+
"date_deleted": null,
|
112
|
+
"sid": "CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
113
|
+
"audio_sources": [
|
114
|
+
"RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
115
|
+
"RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
|
116
|
+
],
|
117
|
+
"video_sources": [],
|
118
|
+
"video_layout": "GRID",
|
119
|
+
"resolution": "1280x720",
|
120
|
+
"format": "mp3",
|
121
|
+
"bitrate": 16,
|
122
|
+
"size": 55,
|
123
|
+
"duration": 10,
|
124
|
+
"url": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
125
|
+
"links": {
|
126
|
+
"media": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
|
127
|
+
}
|
128
|
+
}
|
129
|
+
],
|
130
|
+
"meta": {
|
131
|
+
"page": 0,
|
132
|
+
"page_size": 50,
|
133
|
+
"first_page_url": "https://video.twilio.com/v1/Compositions?PageSize=50&Page=0",
|
134
|
+
"previous_page_url": null,
|
135
|
+
"url": "https://video.twilio.com/v1/Compositions?PageSize=50&Page=0",
|
136
|
+
"next_page_url": null,
|
137
|
+
"key": "compositions"
|
138
|
+
}
|
139
|
+
}
|
140
|
+
]
|
141
|
+
))
|
142
|
+
|
143
|
+
actual = @client.video.v1.compositions.list()
|
144
|
+
|
145
|
+
expect(actual).to_not eq(nil)
|
146
|
+
end
|
147
|
+
|
148
|
+
it "can delete" do
|
149
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
150
|
+
|
151
|
+
expect {
|
152
|
+
@client.video.v1.compositions("CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
153
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
154
|
+
|
155
|
+
values = {}
|
156
|
+
expect(
|
157
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
158
|
+
method: 'delete',
|
159
|
+
url: 'https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
|
160
|
+
))).to eq(true)
|
161
|
+
end
|
162
|
+
|
163
|
+
it "receives delete responses" do
|
164
|
+
@holodeck.mock(Twilio::Response.new(
|
165
|
+
204,
|
166
|
+
nil,
|
167
|
+
))
|
168
|
+
|
169
|
+
actual = @client.video.v1.compositions("CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
|
170
|
+
|
171
|
+
expect(actual).to eq(true)
|
172
|
+
end
|
173
|
+
|
174
|
+
it "can create" do
|
175
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
176
|
+
|
177
|
+
expect {
|
178
|
+
@client.video.v1.compositions.create()
|
179
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
180
|
+
|
181
|
+
values = {}
|
182
|
+
expect(
|
183
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
184
|
+
method: 'post',
|
185
|
+
url: 'https://video.twilio.com/v1/Compositions',
|
186
|
+
))).to eq(true)
|
187
|
+
end
|
188
|
+
|
189
|
+
it "receives create responses" do
|
190
|
+
@holodeck.mock(Twilio::Response.new(
|
191
|
+
201,
|
192
|
+
%q[
|
193
|
+
{
|
194
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
195
|
+
"status": "processing",
|
196
|
+
"date_created": "2015-07-30T20:00:00Z",
|
197
|
+
"date_completed": null,
|
198
|
+
"date_deleted": null,
|
199
|
+
"sid": "CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
200
|
+
"audio_sources": [
|
201
|
+
"RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
202
|
+
"RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
|
203
|
+
],
|
204
|
+
"video_sources": [],
|
205
|
+
"video_layout": "GRID",
|
206
|
+
"resolution": "1280x720",
|
207
|
+
"format": "mp3",
|
208
|
+
"bitrate": 0,
|
209
|
+
"size": 0,
|
210
|
+
"duration": 1,
|
211
|
+
"url": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
212
|
+
"links": {
|
213
|
+
"media": "https://video.twilio.com/v1/Compositions/CJaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
|
214
|
+
}
|
215
|
+
}
|
216
|
+
]
|
217
|
+
))
|
218
|
+
|
219
|
+
actual = @client.video.v1.compositions.create()
|
220
|
+
|
221
|
+
expect(actual).to_not eq(nil)
|
222
|
+
end
|
223
|
+
end
|