mux_ruby 3.5.0 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +4 -4
  4. data/docs/CreateLiveStreamRequest.md +2 -0
  5. data/docs/CreateTranscriptionVocabularyRequest.md +22 -0
  6. data/docs/ListTranscriptionVocabulariesResponse.md +18 -0
  7. data/docs/LiveStream.md +3 -1
  8. data/docs/LiveStreamGeneratedSubtitleSettings.md +24 -0
  9. data/docs/LiveStreamsApi.md +73 -0
  10. data/docs/MetricsApi.md +1 -1
  11. data/docs/RealTimeApi.md +2 -2
  12. data/docs/SpacesApi.md +9 -9
  13. data/docs/Track.md +2 -0
  14. data/docs/TranscriptionVocabulariesApi.md +367 -0
  15. data/docs/TranscriptionVocabulary.md +28 -0
  16. data/docs/TranscriptionVocabularyResponse.md +18 -0
  17. data/docs/UpdateLiveStreamGeneratedSubtitlesRequest.md +18 -0
  18. data/docs/UpdateTranscriptionVocabularyRequest.md +22 -0
  19. data/docs/VideoView.md +11 -1
  20. data/gen/generator-config.json +1 -1
  21. data/gen/templates/partial_model_generic.mustache +2 -2
  22. data/lib/mux_ruby/api/live_streams_api.rb +71 -0
  23. data/lib/mux_ruby/api/metrics_api.rb +2 -2
  24. data/lib/mux_ruby/api/real_time_api.rb +2 -2
  25. data/lib/mux_ruby/api/spaces_api.rb +11 -11
  26. data/lib/mux_ruby/api/transcription_vocabularies_api.rb +349 -0
  27. data/lib/mux_ruby/models/create_live_stream_request.rb +18 -6
  28. data/lib/mux_ruby/models/create_transcription_vocabulary_request.rb +265 -0
  29. data/lib/mux_ruby/models/list_transcription_vocabularies_response.rb +220 -0
  30. data/lib/mux_ruby/models/live_stream.rb +14 -2
  31. data/lib/mux_ruby/models/live_stream_generated_subtitle_settings.rb +287 -0
  32. data/lib/mux_ruby/models/track.rb +23 -1
  33. data/lib/mux_ruby/models/transcription_vocabulary.rb +286 -0
  34. data/lib/mux_ruby/models/transcription_vocabulary_response.rb +218 -0
  35. data/lib/mux_ruby/models/update_live_stream_generated_subtitles_request.rb +221 -0
  36. data/lib/mux_ruby/models/update_live_stream_request.rb +5 -5
  37. data/lib/mux_ruby/models/update_transcription_vocabulary_request.rb +265 -0
  38. data/lib/mux_ruby/models/video_view.rb +55 -5
  39. data/lib/mux_ruby/version.rb +1 -1
  40. data/lib/mux_ruby.rb +8 -0
  41. data/spec/api/transcription_vocabularies_api_spec.rb +97 -0
  42. data/spec/models/create_transcription_vocabulary_request_spec.rb +46 -0
  43. data/spec/models/list_transcription_vocabularies_response_spec.rb +34 -0
  44. data/spec/models/live_stream_generated_subtitle_settings_spec.rb +56 -0
  45. data/spec/models/transcription_vocabulary_response_spec.rb +34 -0
  46. data/spec/models/transcription_vocabulary_spec.rb +64 -0
  47. data/spec/models/update_live_stream_generated_subtitles_request_spec.rb +34 -0
  48. data/spec/models/update_transcription_vocabulary_request_spec.rb +46 -0
  49. metadata +147 -115
@@ -85,7 +85,7 @@ module MuxRuby
85
85
  end
86
86
 
87
87
  # Create a space broadcast
88
- # Creates a new broadcast. Broadcasts are used to create composited versions of your space, which can be broadcast to live streams. **Note:** By default only a single broadcast destination can be specified. Contact Mux support if you need more.
88
+ # Creates a new broadcast. Broadcasts are used to create composited versions of your space, which can be broadcast to live streams. **Note:** By default only a single broadcast destination can be specified. Contact Mux support if you need more.
89
89
  # @param space_id [String] The space ID.
90
90
  # @param create_broadcast_request [CreateBroadcastRequest]
91
91
  # @param [Hash] opts the optional parameters
@@ -96,7 +96,7 @@ module MuxRuby
96
96
  end
97
97
 
98
98
  # Create a space broadcast
99
- # Creates a new broadcast. Broadcasts are used to create composited versions of your space, which can be broadcast to live streams. **Note:** By default only a single broadcast destination can be specified. Contact Mux support if you need more.
99
+ # Creates a new broadcast. Broadcasts are used to create composited versions of your space, which can be broadcast to live streams. **Note:** By default only a single broadcast destination can be specified. Contact Mux support if you need more.
100
100
  # @param space_id [String] The space ID.
101
101
  # @param create_broadcast_request [CreateBroadcastRequest]
102
102
  # @param [Hash] opts the optional parameters
@@ -114,7 +114,7 @@ module MuxRuby
114
114
  fail ArgumentError, "Missing the required parameter 'create_broadcast_request' when calling SpacesApi.create_space_broadcast"
115
115
  end
116
116
  # resource path
117
- local_var_path = '/video/v1/spaces/${SPACE_ID}/broadcasts'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s))
117
+ local_var_path = '/video/v1/spaces/{SPACE_ID}/broadcasts'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s))
118
118
 
119
119
  # query parameters
120
120
  query_params = opts[:query_params] || {}
@@ -179,7 +179,7 @@ module MuxRuby
179
179
  fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.delete_space"
180
180
  end
181
181
  # resource path
182
- local_var_path = '/video/v1/spaces/${SPACE_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s))
182
+ local_var_path = '/video/v1/spaces/{SPACE_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s))
183
183
 
184
184
  # query parameters
185
185
  query_params = opts[:query_params] || {}
@@ -246,7 +246,7 @@ module MuxRuby
246
246
  fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.delete_space_broadcast"
247
247
  end
248
248
  # resource path
249
- local_var_path = '/video/v1/spaces/${SPACE_ID}/broadcasts/${BROADCAST_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)).sub('{' + 'BROADCAST_ID' + '}', CGI.escape(broadcast_id.to_s))
249
+ local_var_path = '/video/v1/spaces/{SPACE_ID}/broadcasts/{BROADCAST_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)).sub('{' + 'BROADCAST_ID' + '}', CGI.escape(broadcast_id.to_s))
250
250
 
251
251
  # query parameters
252
252
  query_params = opts[:query_params] || {}
@@ -307,7 +307,7 @@ module MuxRuby
307
307
  fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.get_space"
308
308
  end
309
309
  # resource path
310
- local_var_path = '/video/v1/spaces/${SPACE_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s))
310
+ local_var_path = '/video/v1/spaces/{SPACE_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s))
311
311
 
312
312
  # query parameters
313
313
  query_params = opts[:query_params] || {}
@@ -376,7 +376,7 @@ module MuxRuby
376
376
  fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.get_space_broadcast"
377
377
  end
378
378
  # resource path
379
- local_var_path = '/video/v1/spaces/${SPACE_ID}/broadcasts/${BROADCAST_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)).sub('{' + 'BROADCAST_ID' + '}', CGI.escape(broadcast_id.to_s))
379
+ local_var_path = '/video/v1/spaces/{SPACE_ID}/broadcasts/{BROADCAST_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)).sub('{' + 'BROADCAST_ID' + '}', CGI.escape(broadcast_id.to_s))
380
380
 
381
381
  # query parameters
382
382
  query_params = opts[:query_params] || {}
@@ -479,7 +479,7 @@ module MuxRuby
479
479
  end
480
480
 
481
481
  # Start a space broadcast
482
- # Starts broadcasting a space to the associated destination.
482
+ # Starts broadcasting a space to the associated destination. Broadcasts can only be started when the space is `active` (when there are participants connected).
483
483
  # @param space_id [String] The space ID.
484
484
  # @param broadcast_id [String] The broadcast ID.
485
485
  # @param [Hash] opts the optional parameters
@@ -490,7 +490,7 @@ module MuxRuby
490
490
  end
491
491
 
492
492
  # Start a space broadcast
493
- # Starts broadcasting a space to the associated destination.
493
+ # Starts broadcasting a space to the associated destination. Broadcasts can only be started when the space is `active` (when there are participants connected).
494
494
  # @param space_id [String] The space ID.
495
495
  # @param broadcast_id [String] The broadcast ID.
496
496
  # @param [Hash] opts the optional parameters
@@ -508,7 +508,7 @@ module MuxRuby
508
508
  fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.start_space_broadcast"
509
509
  end
510
510
  # resource path
511
- local_var_path = '/video/v1/spaces/${SPACE_ID}/broadcasts/${BROADCAST_ID}/start'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)).sub('{' + 'BROADCAST_ID' + '}', CGI.escape(broadcast_id.to_s))
511
+ local_var_path = '/video/v1/spaces/{SPACE_ID}/broadcasts/{BROADCAST_ID}/start'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)).sub('{' + 'BROADCAST_ID' + '}', CGI.escape(broadcast_id.to_s))
512
512
 
513
513
  # query parameters
514
514
  query_params = opts[:query_params] || {}
@@ -577,7 +577,7 @@ module MuxRuby
577
577
  fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.stop_space_broadcast"
578
578
  end
579
579
  # resource path
580
- local_var_path = '/video/v1/spaces/${SPACE_ID}/broadcasts/${BROADCAST_ID}/stop'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)).sub('{' + 'BROADCAST_ID' + '}', CGI.escape(broadcast_id.to_s))
580
+ local_var_path = '/video/v1/spaces/{SPACE_ID}/broadcasts/{BROADCAST_ID}/stop'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)).sub('{' + 'BROADCAST_ID' + '}', CGI.escape(broadcast_id.to_s))
581
581
 
582
582
  # query parameters
583
583
  query_params = opts[:query_params] || {}
@@ -0,0 +1,349 @@
1
+ =begin
2
+ #Mux API
3
+
4
+ #Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: devex@mux.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module MuxRuby
16
+ class TranscriptionVocabulariesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a Transcription Vocabulary
23
+ # Create a new Transcription Vocabulary.
24
+ # @param create_transcription_vocabulary_request [CreateTranscriptionVocabularyRequest]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [TranscriptionVocabularyResponse]
27
+ def create_transcription_vocabulary(create_transcription_vocabulary_request, opts = {})
28
+ data, _status_code, _headers = create_transcription_vocabulary_with_http_info(create_transcription_vocabulary_request, opts)
29
+ data
30
+ end
31
+
32
+ # Create a Transcription Vocabulary
33
+ # Create a new Transcription Vocabulary.
34
+ # @param create_transcription_vocabulary_request [CreateTranscriptionVocabularyRequest]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(TranscriptionVocabularyResponse, Integer, Hash)>] TranscriptionVocabularyResponse data, response status code and response headers
37
+ def create_transcription_vocabulary_with_http_info(create_transcription_vocabulary_request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: TranscriptionVocabulariesApi.create_transcription_vocabulary ...'
40
+ end
41
+ # verify the required parameter 'create_transcription_vocabulary_request' is set
42
+ if @api_client.config.client_side_validation && create_transcription_vocabulary_request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_transcription_vocabulary_request' when calling TranscriptionVocabulariesApi.create_transcription_vocabulary"
44
+ end
45
+ # resource path
46
+ local_var_path = '/video/v1/transcription-vocabularies'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_transcription_vocabulary_request)
63
+
64
+ # return_type
65
+ return_type = opts[:debug_return_type] || 'TranscriptionVocabularyResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:debug_auth_names] || ['accessToken']
69
+
70
+ new_options = opts.merge(
71
+ :operation => :"TranscriptionVocabulariesApi.create_transcription_vocabulary",
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names,
77
+ :return_type => return_type
78
+ )
79
+
80
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: TranscriptionVocabulariesApi#create_transcription_vocabulary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+
87
+ # Delete a Transcription Vocabulary
88
+ # Deletes a Transcription Vocabulary. The Transcription Vocabulary's ID will be disassociated from any live streams using it. Transcription Vocabularies can be deleted while associated live streams are active. However, the words and phrases in the deleted Transcription Vocabulary will remain attached to those streams while they are active.
89
+ # @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [nil]
92
+ def delete_transcription_vocabulary(transcription_vocabulary_id, opts = {})
93
+ delete_transcription_vocabulary_with_http_info(transcription_vocabulary_id, opts)
94
+ nil
95
+ end
96
+
97
+ # Delete a Transcription Vocabulary
98
+ # Deletes a Transcription Vocabulary. The Transcription Vocabulary&#39;s ID will be disassociated from any live streams using it. Transcription Vocabularies can be deleted while associated live streams are active. However, the words and phrases in the deleted Transcription Vocabulary will remain attached to those streams while they are active.
99
+ # @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
102
+ def delete_transcription_vocabulary_with_http_info(transcription_vocabulary_id, opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug 'Calling API: TranscriptionVocabulariesApi.delete_transcription_vocabulary ...'
105
+ end
106
+ # verify the required parameter 'transcription_vocabulary_id' is set
107
+ if @api_client.config.client_side_validation && transcription_vocabulary_id.nil?
108
+ fail ArgumentError, "Missing the required parameter 'transcription_vocabulary_id' when calling TranscriptionVocabulariesApi.delete_transcription_vocabulary"
109
+ end
110
+ # resource path
111
+ local_var_path = '/video/v1/transcription-vocabularies/{TRANSCRIPTION_VOCABULARY_ID}'.sub('{' + 'TRANSCRIPTION_VOCABULARY_ID' + '}', CGI.escape(transcription_vocabulary_id.to_s))
112
+
113
+ # query parameters
114
+ query_params = opts[:query_params] || {}
115
+
116
+ # header parameters
117
+ header_params = opts[:header_params] || {}
118
+
119
+ # form parameters
120
+ form_params = opts[:form_params] || {}
121
+
122
+ # http body (model)
123
+ post_body = opts[:debug_body]
124
+
125
+ # return_type
126
+ return_type = opts[:debug_return_type]
127
+
128
+ # auth_names
129
+ auth_names = opts[:debug_auth_names] || ['accessToken']
130
+
131
+ new_options = opts.merge(
132
+ :operation => :"TranscriptionVocabulariesApi.delete_transcription_vocabulary",
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: TranscriptionVocabulariesApi#delete_transcription_vocabulary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Retrieve a Transcription Vocabulary
149
+ # Retrieves the details of a Transcription Vocabulary that has previously been created. Supply the unique Transcription Vocabulary ID and Mux will return the corresponding Transcription Vocabulary information. The same information is returned when creating a Transcription Vocabulary.
150
+ # @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [TranscriptionVocabularyResponse]
153
+ def get_transcription_vocabulary(transcription_vocabulary_id, opts = {})
154
+ data, _status_code, _headers = get_transcription_vocabulary_with_http_info(transcription_vocabulary_id, opts)
155
+ data
156
+ end
157
+
158
+ # Retrieve a Transcription Vocabulary
159
+ # Retrieves the details of a Transcription Vocabulary that has previously been created. Supply the unique Transcription Vocabulary ID and Mux will return the corresponding Transcription Vocabulary information. The same information is returned when creating a Transcription Vocabulary.
160
+ # @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(TranscriptionVocabularyResponse, Integer, Hash)>] TranscriptionVocabularyResponse data, response status code and response headers
163
+ def get_transcription_vocabulary_with_http_info(transcription_vocabulary_id, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: TranscriptionVocabulariesApi.get_transcription_vocabulary ...'
166
+ end
167
+ # verify the required parameter 'transcription_vocabulary_id' is set
168
+ if @api_client.config.client_side_validation && transcription_vocabulary_id.nil?
169
+ fail ArgumentError, "Missing the required parameter 'transcription_vocabulary_id' when calling TranscriptionVocabulariesApi.get_transcription_vocabulary"
170
+ end
171
+ # resource path
172
+ local_var_path = '/video/v1/transcription-vocabularies/{TRANSCRIPTION_VOCABULARY_ID}'.sub('{' + 'TRANSCRIPTION_VOCABULARY_ID' + '}', CGI.escape(transcription_vocabulary_id.to_s))
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+
177
+ # header parameters
178
+ header_params = opts[:header_params] || {}
179
+ # HTTP header 'Accept' (if needed)
180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
181
+
182
+ # form parameters
183
+ form_params = opts[:form_params] || {}
184
+
185
+ # http body (model)
186
+ post_body = opts[:debug_body]
187
+
188
+ # return_type
189
+ return_type = opts[:debug_return_type] || 'TranscriptionVocabularyResponse'
190
+
191
+ # auth_names
192
+ auth_names = opts[:debug_auth_names] || ['accessToken']
193
+
194
+ new_options = opts.merge(
195
+ :operation => :"TranscriptionVocabulariesApi.get_transcription_vocabulary",
196
+ :header_params => header_params,
197
+ :query_params => query_params,
198
+ :form_params => form_params,
199
+ :body => post_body,
200
+ :auth_names => auth_names,
201
+ :return_type => return_type
202
+ )
203
+
204
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
205
+ if @api_client.config.debugging
206
+ @api_client.config.logger.debug "API called: TranscriptionVocabulariesApi#get_transcription_vocabulary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
207
+ end
208
+ return data, status_code, headers
209
+ end
210
+
211
+ # List Transcription Vocabularies
212
+ # List all Transcription Vocabularies.
213
+ # @param [Hash] opts the optional parameters
214
+ # @option opts [Integer] :limit Number of items to include in the response (default to 10)
215
+ # @option opts [Integer] :page Offset by this many pages, of the size of &#x60;limit&#x60; (default to 1)
216
+ # @return [ListTranscriptionVocabulariesResponse]
217
+ def list_transcription_vocabularies(opts = {})
218
+ data, _status_code, _headers = list_transcription_vocabularies_with_http_info(opts)
219
+ data
220
+ end
221
+
222
+ # List Transcription Vocabularies
223
+ # List all Transcription Vocabularies.
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [Integer] :limit Number of items to include in the response
226
+ # @option opts [Integer] :page Offset by this many pages, of the size of &#x60;limit&#x60;
227
+ # @return [Array<(ListTranscriptionVocabulariesResponse, Integer, Hash)>] ListTranscriptionVocabulariesResponse data, response status code and response headers
228
+ def list_transcription_vocabularies_with_http_info(opts = {})
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug 'Calling API: TranscriptionVocabulariesApi.list_transcription_vocabularies ...'
231
+ end
232
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10
233
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TranscriptionVocabulariesApi.list_transcription_vocabularies, must be smaller than or equal to 10.'
234
+ end
235
+
236
+ # resource path
237
+ local_var_path = '/video/v1/transcription-vocabularies'
238
+
239
+ # query parameters
240
+ query_params = opts[:query_params] || {}
241
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
242
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
243
+
244
+ # header parameters
245
+ header_params = opts[:header_params] || {}
246
+ # HTTP header 'Accept' (if needed)
247
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
248
+
249
+ # form parameters
250
+ form_params = opts[:form_params] || {}
251
+
252
+ # http body (model)
253
+ post_body = opts[:debug_body]
254
+
255
+ # return_type
256
+ return_type = opts[:debug_return_type] || 'ListTranscriptionVocabulariesResponse'
257
+
258
+ # auth_names
259
+ auth_names = opts[:debug_auth_names] || ['accessToken']
260
+
261
+ new_options = opts.merge(
262
+ :operation => :"TranscriptionVocabulariesApi.list_transcription_vocabularies",
263
+ :header_params => header_params,
264
+ :query_params => query_params,
265
+ :form_params => form_params,
266
+ :body => post_body,
267
+ :auth_names => auth_names,
268
+ :return_type => return_type
269
+ )
270
+
271
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
272
+ if @api_client.config.debugging
273
+ @api_client.config.logger.debug "API called: TranscriptionVocabulariesApi#list_transcription_vocabularies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
274
+ end
275
+ return data, status_code, headers
276
+ end
277
+
278
+ # Update a Transcription Vocabulary
279
+ # Updates the details of a previously-created Transcription Vocabulary. Updates to Transcription Vocabularies are allowed while associated live streams are active. However, updates will not be applied to those streams while they are active.
280
+ # @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
281
+ # @param update_transcription_vocabulary_request [UpdateTranscriptionVocabularyRequest]
282
+ # @param [Hash] opts the optional parameters
283
+ # @return [TranscriptionVocabularyResponse]
284
+ def update_transcription_vocabulary(transcription_vocabulary_id, update_transcription_vocabulary_request, opts = {})
285
+ data, _status_code, _headers = update_transcription_vocabulary_with_http_info(transcription_vocabulary_id, update_transcription_vocabulary_request, opts)
286
+ data
287
+ end
288
+
289
+ # Update a Transcription Vocabulary
290
+ # Updates the details of a previously-created Transcription Vocabulary. Updates to Transcription Vocabularies are allowed while associated live streams are active. However, updates will not be applied to those streams while they are active.
291
+ # @param transcription_vocabulary_id [String] The ID of the Transcription Vocabulary.
292
+ # @param update_transcription_vocabulary_request [UpdateTranscriptionVocabularyRequest]
293
+ # @param [Hash] opts the optional parameters
294
+ # @return [Array<(TranscriptionVocabularyResponse, Integer, Hash)>] TranscriptionVocabularyResponse data, response status code and response headers
295
+ def update_transcription_vocabulary_with_http_info(transcription_vocabulary_id, update_transcription_vocabulary_request, opts = {})
296
+ if @api_client.config.debugging
297
+ @api_client.config.logger.debug 'Calling API: TranscriptionVocabulariesApi.update_transcription_vocabulary ...'
298
+ end
299
+ # verify the required parameter 'transcription_vocabulary_id' is set
300
+ if @api_client.config.client_side_validation && transcription_vocabulary_id.nil?
301
+ fail ArgumentError, "Missing the required parameter 'transcription_vocabulary_id' when calling TranscriptionVocabulariesApi.update_transcription_vocabulary"
302
+ end
303
+ # verify the required parameter 'update_transcription_vocabulary_request' is set
304
+ if @api_client.config.client_side_validation && update_transcription_vocabulary_request.nil?
305
+ fail ArgumentError, "Missing the required parameter 'update_transcription_vocabulary_request' when calling TranscriptionVocabulariesApi.update_transcription_vocabulary"
306
+ end
307
+ # resource path
308
+ local_var_path = '/video/v1/transcription-vocabularies/{TRANSCRIPTION_VOCABULARY_ID}'.sub('{' + 'TRANSCRIPTION_VOCABULARY_ID' + '}', CGI.escape(transcription_vocabulary_id.to_s))
309
+
310
+ # query parameters
311
+ query_params = opts[:query_params] || {}
312
+
313
+ # header parameters
314
+ header_params = opts[:header_params] || {}
315
+ # HTTP header 'Accept' (if needed)
316
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
317
+ # HTTP header 'Content-Type'
318
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
319
+
320
+ # form parameters
321
+ form_params = opts[:form_params] || {}
322
+
323
+ # http body (model)
324
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_transcription_vocabulary_request)
325
+
326
+ # return_type
327
+ return_type = opts[:debug_return_type] || 'TranscriptionVocabularyResponse'
328
+
329
+ # auth_names
330
+ auth_names = opts[:debug_auth_names] || ['accessToken']
331
+
332
+ new_options = opts.merge(
333
+ :operation => :"TranscriptionVocabulariesApi.update_transcription_vocabulary",
334
+ :header_params => header_params,
335
+ :query_params => query_params,
336
+ :form_params => form_params,
337
+ :body => post_body,
338
+ :auth_names => auth_names,
339
+ :return_type => return_type
340
+ )
341
+
342
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
343
+ if @api_client.config.debugging
344
+ @api_client.config.logger.debug "API called: TranscriptionVocabulariesApi#update_transcription_vocabulary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
345
+ end
346
+ return data, status_code, headers
347
+ end
348
+ end
349
+ end
@@ -30,6 +30,9 @@ module MuxRuby
30
30
  # Describe the embedded closed caption contents of the incoming live stream.
31
31
  attr_accessor :embedded_subtitles
32
32
 
33
+ # Configure the incoming live stream to include subtitles created with automatic speech recognition. Each Asset created from a live stream with `generated_subtitles` configured will automatically receive two text tracks. The first of these will have a `text_source` value of `generated_live`, and will be available with `ready` status as soon as the stream is live. The second text track will have a `text_source` value of `generated_live_final` and will contain subtitles with improved accuracy, timing, and formatting. However, `generated_live_final` tracks will not be available in `ready` status until the live stream ends. If an Asset has both `generated_live` and `generated_live_final` tracks that are `ready`, then only the `generated_live_final` track will be included during playback.
34
+ attr_accessor :generated_subtitles
35
+
33
36
  # This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/
34
37
  attr_accessor :reduced_latency
35
38
 
@@ -78,6 +81,7 @@ module MuxRuby
78
81
  :'passthrough' => :'passthrough',
79
82
  :'audio_only' => :'audio_only',
80
83
  :'embedded_subtitles' => :'embedded_subtitles',
84
+ :'generated_subtitles' => :'generated_subtitles',
81
85
  :'reduced_latency' => :'reduced_latency',
82
86
  :'low_latency' => :'low_latency',
83
87
  :'latency_mode' => :'latency_mode',
@@ -101,6 +105,7 @@ module MuxRuby
101
105
  :'passthrough' => :'String',
102
106
  :'audio_only' => :'Boolean',
103
107
  :'embedded_subtitles' => :'Array<LiveStreamEmbeddedSubtitleSettings>',
108
+ :'generated_subtitles' => :'Array<LiveStreamGeneratedSubtitleSettings>',
104
109
  :'reduced_latency' => :'Boolean',
105
110
  :'low_latency' => :'Boolean',
106
111
  :'latency_mode' => :'String',
@@ -159,6 +164,12 @@ module MuxRuby
159
164
  end
160
165
  end
161
166
 
167
+ if attributes.key?(:'generated_subtitles')
168
+ if (value = attributes[:'generated_subtitles']).is_a?(Array)
169
+ self.generated_subtitles = value
170
+ end
171
+ end
172
+
162
173
  if attributes.key?(:'reduced_latency')
163
174
  self.reduced_latency = attributes[:'reduced_latency']
164
175
  end
@@ -192,8 +203,8 @@ module MuxRuby
192
203
  # @return Array for valid properties with the reasons
193
204
  def list_invalid_properties
194
205
  invalid_properties = Array.new
195
- if !@reconnect_window.nil? && @reconnect_window > 300
196
- invalid_properties.push('invalid value for "reconnect_window", must be smaller than or equal to 300.')
206
+ if !@reconnect_window.nil? && @reconnect_window > 1800
207
+ invalid_properties.push('invalid value for "reconnect_window", must be smaller than or equal to 1800.')
197
208
  end
198
209
 
199
210
  if !@reconnect_window.nil? && @reconnect_window < 0.1
@@ -214,7 +225,7 @@ module MuxRuby
214
225
  # Check to see if the all the properties in the model are valid
215
226
  # @return true if the model is valid
216
227
  def valid?
217
- return false if !@reconnect_window.nil? && @reconnect_window > 300
228
+ return false if !@reconnect_window.nil? && @reconnect_window > 1800
218
229
  return false if !@reconnect_window.nil? && @reconnect_window < 0.1
219
230
  latency_mode_validator = EnumAttributeValidator.new('String', ["low", "reduced", "standard"])
220
231
  return false unless latency_mode_validator.valid?(@latency_mode)
@@ -226,8 +237,8 @@ module MuxRuby
226
237
  # Custom attribute writer method with validation
227
238
  # @param [Object] reconnect_window Value to be assigned
228
239
  def reconnect_window=(reconnect_window)
229
- if !reconnect_window.nil? && reconnect_window > 300
230
- fail ArgumentError, 'invalid value for "reconnect_window", must be smaller than or equal to 300.'
240
+ if !reconnect_window.nil? && reconnect_window > 1800
241
+ fail ArgumentError, 'invalid value for "reconnect_window", must be smaller than or equal to 1800.'
231
242
  end
232
243
 
233
244
  if !reconnect_window.nil? && reconnect_window < 0.1
@@ -272,6 +283,7 @@ module MuxRuby
272
283
  passthrough == o.passthrough &&
273
284
  audio_only == o.audio_only &&
274
285
  embedded_subtitles == o.embedded_subtitles &&
286
+ generated_subtitles == o.generated_subtitles &&
275
287
  reduced_latency == o.reduced_latency &&
276
288
  low_latency == o.low_latency &&
277
289
  latency_mode == o.latency_mode &&
@@ -289,7 +301,7 @@ module MuxRuby
289
301
  # Calculates hash code according to all attributes.
290
302
  # @return [Integer] Hash code
291
303
  def hash
292
- [playback_policy, new_asset_settings, reconnect_window, passthrough, audio_only, embedded_subtitles, reduced_latency, low_latency, latency_mode, test, simulcast_targets, max_continuous_duration].hash
304
+ [playback_policy, new_asset_settings, reconnect_window, passthrough, audio_only, embedded_subtitles, generated_subtitles, reduced_latency, low_latency, latency_mode, test, simulcast_targets, max_continuous_duration].hash
293
305
  end
294
306
 
295
307
  # Builds the object from hash