twilio-ruby 5.25.2 → 5.25.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +11 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/authy.rb +8 -8
- data/lib/twilio-ruby/rest/authy/v1.rb +15 -15
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations.rb +53 -0
- data/lib/twilio-ruby/rest/conversations/v1.rb +51 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +471 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +416 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +407 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +432 -0
- data/lib/twilio-ruby/rest/conversations/v1/webhook.rb +272 -0
- data/lib/twilio-ruby/rest/flex_api.rb +6 -6
- data/lib/twilio-ruby/rest/flex_api/v1.rb +7 -7
- data/lib/twilio-ruby/rest/messaging.rb +8 -8
- data/lib/twilio-ruby/rest/messaging/v1.rb +14 -14
- data/lib/twilio-ruby/rest/preview.rb +20 -20
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +14 -14
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +14 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +30 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +370 -0
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/rest/wireless.rb +6 -6
- data/lib/twilio-ruby/rest/wireless/v1.rb +9 -8
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +27 -18
- data/lib/twilio-ruby/twiml/voice_response.rb +161 -11
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/conversations/v1/conversation/message_spec.rb +223 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +265 -0
- data/spec/integration/conversations/v1/conversation/webhook_spec.rb +286 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +218 -0
- data/spec/integration/conversations/v1/webhook_spec.rb +88 -0
- data/spec/integration/serverless/v1/service/build_spec.rb +28 -0
- data/spec/integration/serverless/v1/service/environment/log_spec.rb +98 -0
- data/spec/integration/serverless/v1/service/environment_spec.rb +4 -2
- data/spec/integration/verify/v2/service/verification_spec.rb +36 -0
- data/spec/integration/wireless/v1/rate_plan_spec.rb +12 -12
- metadata +22 -2
@@ -28,15 +28,6 @@ module Twilio
|
|
28
28
|
@v1 ||= V1.new self
|
29
29
|
end
|
30
30
|
|
31
|
-
##
|
32
|
-
# @param [String] sid `CJxx…xx` A system-generated 34-character string that
|
33
|
-
# uniquely identifies this Composition.
|
34
|
-
# @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
|
35
|
-
# @return [Twilio::REST::Video::V1::CompositionList]
|
36
|
-
def compositions(sid=:unset)
|
37
|
-
self.v1.compositions(sid)
|
38
|
-
end
|
39
|
-
|
40
31
|
##
|
41
32
|
# @param [String] sid `HKxx…xx` A system-generated 34-character string that
|
42
33
|
# uniquely identifies this Composition Hook.
|
@@ -67,6 +58,15 @@ module Twilio
|
|
67
58
|
self.v1.recording_settings()
|
68
59
|
end
|
69
60
|
|
61
|
+
##
|
62
|
+
# @param [String] sid `CJxx…xx` A system-generated 34-character string that
|
63
|
+
# uniquely identifies this Composition.
|
64
|
+
# @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed.
|
65
|
+
# @return [Twilio::REST::Video::V1::CompositionList]
|
66
|
+
def compositions(sid=:unset)
|
67
|
+
self.v1.compositions(sid)
|
68
|
+
end
|
69
|
+
|
70
70
|
##
|
71
71
|
# @param [String] sid A system-generated 34-character string that uniquely
|
72
72
|
# identifies this resource.
|
@@ -15,29 +15,14 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
|
-
@compositions = nil
|
19
18
|
@composition_hooks = nil
|
20
19
|
@composition_settings = nil
|
21
20
|
@recordings = nil
|
22
21
|
@recording_settings = nil
|
22
|
+
@compositions = nil
|
23
23
|
@rooms = nil
|
24
24
|
end
|
25
25
|
|
26
|
-
##
|
27
|
-
# @param [String] sid The Composition Sid that uniquely identifies the Composition
|
28
|
-
# to fetch.
|
29
|
-
# @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
|
30
|
-
# @return [Twilio::REST::Video::V1::CompositionList]
|
31
|
-
def compositions(sid=:unset)
|
32
|
-
if sid.nil?
|
33
|
-
raise ArgumentError, 'sid cannot be nil'
|
34
|
-
elsif sid == :unset
|
35
|
-
@compositions ||= CompositionList.new self
|
36
|
-
else
|
37
|
-
CompositionContext.new(self, sid)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
26
|
##
|
42
27
|
# @param [String] sid The Composition Hook Sid that uniquely identifies the
|
43
28
|
# Composition Hook to fetch.
|
@@ -80,6 +65,21 @@ module Twilio
|
|
80
65
|
@recording_settings ||= RecordingSettingsContext.new self
|
81
66
|
end
|
82
67
|
|
68
|
+
##
|
69
|
+
# @param [String] sid The Composition Sid that uniquely identifies the Composition
|
70
|
+
# to fetch.
|
71
|
+
# @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed.
|
72
|
+
# @return [Twilio::REST::Video::V1::CompositionList]
|
73
|
+
def compositions(sid=:unset)
|
74
|
+
if sid.nil?
|
75
|
+
raise ArgumentError, 'sid cannot be nil'
|
76
|
+
elsif sid == :unset
|
77
|
+
@compositions ||= CompositionList.new self
|
78
|
+
else
|
79
|
+
CompositionContext.new(self, sid)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
83
|
##
|
84
84
|
# @param [String] sid The Room Sid or name that uniquely identifies this resource.
|
85
85
|
# @return [Twilio::REST::Video::V1::RoomContext] if sid was passed.
|
@@ -28,12 +28,6 @@ module Twilio
|
|
28
28
|
@v1 ||= V1.new self
|
29
29
|
end
|
30
30
|
|
31
|
-
##
|
32
|
-
# @return [Twilio::REST::Wireless::V1::UsageRecordInstance]
|
33
|
-
def usage_records
|
34
|
-
self.v1.usage_records()
|
35
|
-
end
|
36
|
-
|
37
31
|
##
|
38
32
|
# @param [String] sid A 34 character string that uniquely identifies this
|
39
33
|
# resource.
|
@@ -52,6 +46,12 @@ module Twilio
|
|
52
46
|
self.v1.rate_plans(sid)
|
53
47
|
end
|
54
48
|
|
49
|
+
##
|
50
|
+
# @return [Twilio::REST::Wireless::V1::UsageRecordInstance]
|
51
|
+
def usage_records
|
52
|
+
self.v1.usage_records()
|
53
|
+
end
|
54
|
+
|
55
55
|
##
|
56
56
|
# @param [String] sid A 34 character string that uniquely identifies this
|
57
57
|
# resource.
|
@@ -15,18 +15,12 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
|
-
@usage_records = nil
|
19
18
|
@commands = nil
|
20
19
|
@rate_plans = nil
|
20
|
+
@usage_records = nil
|
21
21
|
@sims = nil
|
22
22
|
end
|
23
23
|
|
24
|
-
##
|
25
|
-
# @return [Twilio::REST::Wireless::V1::UsageRecordContext]
|
26
|
-
def usage_records
|
27
|
-
@usage_records ||= UsageRecordList.new self
|
28
|
-
end
|
29
|
-
|
30
24
|
##
|
31
25
|
# @param [String] sid A 34 character string that uniquely identifies this
|
32
26
|
# resource.
|
@@ -43,7 +37,8 @@ module Twilio
|
|
43
37
|
end
|
44
38
|
|
45
39
|
##
|
46
|
-
# @param [String] sid
|
40
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
41
|
+
# resource.
|
47
42
|
# @return [Twilio::REST::Wireless::V1::RatePlanContext] if sid was passed.
|
48
43
|
# @return [Twilio::REST::Wireless::V1::RatePlanList]
|
49
44
|
def rate_plans(sid=:unset)
|
@@ -56,6 +51,12 @@ module Twilio
|
|
56
51
|
end
|
57
52
|
end
|
58
53
|
|
54
|
+
##
|
55
|
+
# @return [Twilio::REST::Wireless::V1::UsageRecordContext]
|
56
|
+
def usage_records
|
57
|
+
@usage_records ||= UsageRecordList.new self
|
58
|
+
end
|
59
|
+
|
59
60
|
##
|
60
61
|
# @param [String] sid A 34 character string that uniquely identifies this
|
61
62
|
# resource.
|
@@ -116,11 +116,12 @@ module Twilio
|
|
116
116
|
# GPRS/3G/LTE data connectivity.
|
117
117
|
# @param [String] data_limit Network-enforced limit specifying the total Megabytes
|
118
118
|
# of data usage (download and upload combined) allowed during one month on the
|
119
|
-
# home network. Metering begins on the day of activation and ends
|
120
|
-
# of the following month. Max value is 2TB.
|
119
|
+
# 'home' (T-Mobile USA) network. Metering begins on the day of activation and ends
|
120
|
+
# on the same day of the following month. Max value is 2TB. Default value is
|
121
|
+
# `1000`.
|
121
122
|
# @param [String] data_metering The model by which to meter data usage, in
|
122
|
-
# accordance with the
|
123
|
-
# models](https://www.twilio.com/docs/
|
123
|
+
# accordance with the available [data metering
|
124
|
+
# models](https://www.twilio.com/docs/wireless/api/rate-plan#payg-vs-quota-data-plans). Valid options are `payg` and `quota-1`, `quota-10`, and `quota-50`. Defaults to `payg`.
|
124
125
|
# @param [Boolean] messaging_enabled Defines whether SIMs are capable of making
|
125
126
|
# and sending and receiving SMS messages via either
|
126
127
|
# [Commands](https://www.twilio.com/docs/wireless/api/commands) or Programmable
|
@@ -128,15 +129,21 @@ module Twilio
|
|
128
129
|
# @param [Boolean] voice_enabled Defines whether SIMs are capable of making and
|
129
130
|
# receiving voice calls.
|
130
131
|
# @param [Boolean] national_roaming_enabled Defines whether SIMs can roam onto
|
131
|
-
# other
|
132
|
+
# networks other than the 'home' (T-Mobile USA) network in the United States. See
|
133
|
+
# ['national'
|
132
134
|
# roaming](https://www.twilio.com/docs/api/wireless/rest-api/rate-plan#national-roaming).
|
133
|
-
# @param [String] international_roaming
|
135
|
+
# @param [String] international_roaming Defines whether SIMs are capable of using
|
136
|
+
# GPRS/3G/4G/LTE data connectivity and messaging outside of the United States.
|
137
|
+
# Acceptable values are `data` and `messaging`.
|
134
138
|
# @param [String] national_roaming_data_limit Network-enforced limit specifying
|
135
139
|
# the total Megabytes of national roaming data usage (download and upload
|
136
|
-
# combined) allowed during one month
|
137
|
-
#
|
138
|
-
#
|
139
|
-
#
|
140
|
+
# combined) allowed during one month on networks in the United States other than
|
141
|
+
# the 'home' (T-Mobile USA) network. See ['national'
|
142
|
+
# roaming](https://www.twilio.com/docs/api/wireless/rest-api/rate-plan#national-roaming). Max value is 2TB.
|
143
|
+
# @param [String] international_roaming_data_limit Network-enforced limit
|
144
|
+
# specifying the total Megabytes of international roaming (non-US) data usage
|
145
|
+
# (download and upload combined) allowed during one month. Max value is 2TB.
|
146
|
+
# Default value is the lesser of `DataLimit` and `1000`MB.
|
140
147
|
# @return [RatePlanInstance] Newly created RatePlanInstance
|
141
148
|
def create(unique_name: :unset, friendly_name: :unset, data_enabled: :unset, data_limit: :unset, data_metering: :unset, messaging_enabled: :unset, voice_enabled: :unset, national_roaming_enabled: :unset, international_roaming: :unset, national_roaming_data_limit: :unset, international_roaming_data_limit: :unset)
|
142
149
|
data = Twilio::Values.of({
|
@@ -202,7 +209,8 @@ module Twilio
|
|
202
209
|
##
|
203
210
|
# Initialize the RatePlanContext
|
204
211
|
# @param [Version] version Version that contains the resource
|
205
|
-
# @param [String] sid
|
212
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
213
|
+
# resource.
|
206
214
|
# @return [RatePlanContext] RatePlanContext
|
207
215
|
def initialize(version, sid)
|
208
216
|
super(version)
|
@@ -273,7 +281,8 @@ module Twilio
|
|
273
281
|
# Initialize the RatePlanInstance
|
274
282
|
# @param [Version] version Version that contains the resource
|
275
283
|
# @param [Hash] payload payload that contains response from Twilio
|
276
|
-
# @param [String] sid
|
284
|
+
# @param [String] sid A 34 character string that uniquely identifies this
|
285
|
+
# resource.
|
277
286
|
# @return [RatePlanInstance] RatePlanInstance
|
278
287
|
def initialize(version, payload, sid: nil)
|
279
288
|
super(version)
|
@@ -345,13 +354,13 @@ module Twilio
|
|
345
354
|
end
|
346
355
|
|
347
356
|
##
|
348
|
-
# @return [String] The model by which to meter data usage, in accordance with the
|
357
|
+
# @return [String] The model by which to meter data usage, in accordance with the available data metering models.
|
349
358
|
def data_metering
|
350
359
|
@properties['data_metering']
|
351
360
|
end
|
352
361
|
|
353
362
|
##
|
354
|
-
# @return [String] Network-enforced limit specifying the total Megabytes of data usage allowed during one month on the home network.
|
363
|
+
# @return [String] Network-enforced limit specifying the total Megabytes of data usage allowed during one month on the 'home' (T-Mobile USA) network.
|
355
364
|
def data_limit
|
356
365
|
@properties['data_limit']
|
357
366
|
end
|
@@ -369,25 +378,25 @@ module Twilio
|
|
369
378
|
end
|
370
379
|
|
371
380
|
##
|
372
|
-
# @return [Boolean] Defines whether SIMs can roam onto other
|
381
|
+
# @return [Boolean] Defines whether SIMs can roam onto networks other than the 'home' (T-Mobile USA) network in the United States.
|
373
382
|
def national_roaming_enabled
|
374
383
|
@properties['national_roaming_enabled']
|
375
384
|
end
|
376
385
|
|
377
386
|
##
|
378
|
-
# @return [String] Network-enforced limit specifying the total Megabytes of national roaming data usage allowed during one month.
|
387
|
+
# @return [String] Network-enforced limit specifying the total Megabytes of 'national roaming' data usage allowed during one month on networks in the United States other than the 'home' (T-Mobile USA) network.
|
379
388
|
def national_roaming_data_limit
|
380
389
|
@properties['national_roaming_data_limit']
|
381
390
|
end
|
382
391
|
|
383
392
|
##
|
384
|
-
# @return [String]
|
393
|
+
# @return [String] Defines whether SIMs are capable of using GPRS/3G/4G/LTE data connectivity and messaging outside of the United States.
|
385
394
|
def international_roaming
|
386
395
|
@properties['international_roaming']
|
387
396
|
end
|
388
397
|
|
389
398
|
##
|
390
|
-
# @return [String]
|
399
|
+
# @return [String] Network-enforced limit specifying the total Megabytes of 'international roaming' (non-US) data usage (download and upload combined) allowed during one month.
|
391
400
|
def international_roaming_data_limit
|
392
401
|
@properties['international_roaming_data_limit']
|
393
402
|
end
|
@@ -248,6 +248,153 @@ module Twilio
|
|
248
248
|
yield(prompt) if block_given?
|
249
249
|
append(prompt)
|
250
250
|
end
|
251
|
+
|
252
|
+
##
|
253
|
+
# Create a new <Start> element
|
254
|
+
# action:: Action URL
|
255
|
+
# method:: Action URL method
|
256
|
+
# keyword_args:: additional attributes
|
257
|
+
def start(action: nil, method: nil, **keyword_args)
|
258
|
+
start = Start.new(action: action, method: method, **keyword_args)
|
259
|
+
|
260
|
+
yield(start) if block_given?
|
261
|
+
append(start)
|
262
|
+
end
|
263
|
+
|
264
|
+
##
|
265
|
+
# Create a new <Stop> element
|
266
|
+
# keyword_args:: additional attributes
|
267
|
+
def stop(**keyword_args)
|
268
|
+
stop = Stop.new(**keyword_args)
|
269
|
+
|
270
|
+
yield(stop) if block_given?
|
271
|
+
append(stop)
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
##
|
276
|
+
# <Stop> TwiML Verb
|
277
|
+
class Stop < TwiML
|
278
|
+
def initialize(**keyword_args)
|
279
|
+
super(**keyword_args)
|
280
|
+
@name = 'Stop'
|
281
|
+
|
282
|
+
yield(self) if block_given?
|
283
|
+
end
|
284
|
+
|
285
|
+
##
|
286
|
+
# Create a new <Stream> element
|
287
|
+
# name:: Friendly name given to the Stream
|
288
|
+
# connector_name:: Unique name for Stream Connector
|
289
|
+
# url:: URL of the remote service where the Stream is routed
|
290
|
+
# track:: Track to be streamed to remote service
|
291
|
+
# keyword_args:: additional attributes
|
292
|
+
def stream(name: nil, connector_name: nil, url: nil, track: nil, **keyword_args)
|
293
|
+
stream = Stream.new(name: name, connector_name: connector_name, url: url, track: track, **keyword_args)
|
294
|
+
|
295
|
+
yield(stream) if block_given?
|
296
|
+
append(stream)
|
297
|
+
end
|
298
|
+
|
299
|
+
##
|
300
|
+
# Create a new <Siprec> element
|
301
|
+
# name:: Friendly name given to SIPREC
|
302
|
+
# connector_name:: Unique name for Connector
|
303
|
+
# keyword_args:: additional attributes
|
304
|
+
def siprec(name: nil, connector_name: nil, **keyword_args)
|
305
|
+
siprec = Siprec.new(name: name, connector_name: connector_name, **keyword_args)
|
306
|
+
|
307
|
+
yield(siprec) if block_given?
|
308
|
+
append(siprec)
|
309
|
+
end
|
310
|
+
end
|
311
|
+
|
312
|
+
##
|
313
|
+
# <Siprec> TwiML Noun
|
314
|
+
class Siprec < TwiML
|
315
|
+
def initialize(**keyword_args)
|
316
|
+
super(**keyword_args)
|
317
|
+
@name = 'Siprec'
|
318
|
+
|
319
|
+
yield(self) if block_given?
|
320
|
+
end
|
321
|
+
|
322
|
+
##
|
323
|
+
# Create a new <Parameter> element
|
324
|
+
# name:: The name of the custom parameter
|
325
|
+
# value:: The value of the custom parameter
|
326
|
+
# keyword_args:: additional attributes
|
327
|
+
def parameter(name: nil, value: nil, **keyword_args)
|
328
|
+
append(Parameter.new(name: name, value: value, **keyword_args))
|
329
|
+
end
|
330
|
+
end
|
331
|
+
|
332
|
+
##
|
333
|
+
# <Parameter> TwiML Noun
|
334
|
+
class Parameter < TwiML
|
335
|
+
def initialize(**keyword_args)
|
336
|
+
super(**keyword_args)
|
337
|
+
@name = 'Parameter'
|
338
|
+
|
339
|
+
yield(self) if block_given?
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
##
|
344
|
+
# <Stream> TwiML Noun
|
345
|
+
class Stream < TwiML
|
346
|
+
def initialize(**keyword_args)
|
347
|
+
super(**keyword_args)
|
348
|
+
@name = 'Stream'
|
349
|
+
|
350
|
+
yield(self) if block_given?
|
351
|
+
end
|
352
|
+
|
353
|
+
##
|
354
|
+
# Create a new <Parameter> element
|
355
|
+
# name:: The name of the custom parameter
|
356
|
+
# value:: The value of the custom parameter
|
357
|
+
# keyword_args:: additional attributes
|
358
|
+
def parameter(name: nil, value: nil, **keyword_args)
|
359
|
+
append(Parameter.new(name: name, value: value, **keyword_args))
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
363
|
+
##
|
364
|
+
# <Start> TwiML Verb
|
365
|
+
class Start < TwiML
|
366
|
+
def initialize(**keyword_args)
|
367
|
+
super(**keyword_args)
|
368
|
+
@name = 'Start'
|
369
|
+
|
370
|
+
yield(self) if block_given?
|
371
|
+
end
|
372
|
+
|
373
|
+
##
|
374
|
+
# Create a new <Stream> element
|
375
|
+
# name:: Friendly name given to the Stream
|
376
|
+
# connector_name:: Unique name for Stream Connector
|
377
|
+
# url:: URL of the remote service where the Stream is routed
|
378
|
+
# track:: Track to be streamed to remote service
|
379
|
+
# keyword_args:: additional attributes
|
380
|
+
def stream(name: nil, connector_name: nil, url: nil, track: nil, **keyword_args)
|
381
|
+
stream = Stream.new(name: name, connector_name: connector_name, url: url, track: track, **keyword_args)
|
382
|
+
|
383
|
+
yield(stream) if block_given?
|
384
|
+
append(stream)
|
385
|
+
end
|
386
|
+
|
387
|
+
##
|
388
|
+
# Create a new <Siprec> element
|
389
|
+
# name:: Friendly name given to SIPREC
|
390
|
+
# connector_name:: Unique name for Connector
|
391
|
+
# keyword_args:: additional attributes
|
392
|
+
def siprec(name: nil, connector_name: nil, **keyword_args)
|
393
|
+
siprec = Siprec.new(name: name, connector_name: connector_name, **keyword_args)
|
394
|
+
|
395
|
+
yield(siprec) if block_given?
|
396
|
+
append(siprec)
|
397
|
+
end
|
251
398
|
end
|
252
399
|
|
253
400
|
##
|
@@ -890,17 +1037,6 @@ module Twilio
|
|
890
1037
|
end
|
891
1038
|
end
|
892
1039
|
|
893
|
-
##
|
894
|
-
# <Parameter> TwiML Noun
|
895
|
-
class Parameter < TwiML
|
896
|
-
def initialize(**keyword_args)
|
897
|
-
super(**keyword_args)
|
898
|
-
@name = 'Parameter'
|
899
|
-
|
900
|
-
yield(self) if block_given?
|
901
|
-
end
|
902
|
-
end
|
903
|
-
|
904
1040
|
##
|
905
1041
|
# <Identity> TwiML Noun
|
906
1042
|
class Identity < TwiML
|
@@ -938,6 +1074,20 @@ module Twilio
|
|
938
1074
|
def autopilot(name, **keyword_args)
|
939
1075
|
append(Autopilot.new(name, **keyword_args))
|
940
1076
|
end
|
1077
|
+
|
1078
|
+
##
|
1079
|
+
# Create a new <Stream> element
|
1080
|
+
# name:: Friendly name given to the Stream
|
1081
|
+
# connector_name:: Unique name for Stream Connector
|
1082
|
+
# url:: URL of the remote service where the Stream is routed
|
1083
|
+
# track:: Track to be streamed to remote service
|
1084
|
+
# keyword_args:: additional attributes
|
1085
|
+
def stream(name: nil, connector_name: nil, url: nil, track: nil, **keyword_args)
|
1086
|
+
stream = Stream.new(name: name, connector_name: connector_name, url: url, track: track, **keyword_args)
|
1087
|
+
|
1088
|
+
yield(stream) if block_given?
|
1089
|
+
append(stream)
|
1090
|
+
end
|
941
1091
|
end
|
942
1092
|
|
943
1093
|
##
|