mux_ruby 3.4.0 → 3.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +13 -7
  4. data/docs/Asset.md +1 -1
  5. data/docs/Broadcast.md +30 -0
  6. data/docs/BroadcastLayout.md +15 -0
  7. data/docs/BroadcastResolution.md +15 -0
  8. data/docs/BroadcastResponse.md +18 -0
  9. data/docs/BroadcastStatus.md +15 -0
  10. data/docs/CreateBroadcastRequest.md +26 -0
  11. data/docs/CreateSimulcastTargetRequest.md +1 -1
  12. data/docs/CreateSpaceRequest.md +22 -0
  13. data/docs/ListSpacesResponse.md +18 -0
  14. data/docs/MetricsApi.md +3 -3
  15. data/docs/RealTimeApi.md +2 -2
  16. data/docs/Space.md +30 -0
  17. data/docs/SpaceResponse.md +18 -0
  18. data/docs/SpaceStatus.md +15 -0
  19. data/docs/SpaceType.md +15 -0
  20. data/docs/SpacesApi.md +658 -0
  21. data/docs/StartSpaceBroadcastResponse.md +18 -0
  22. data/docs/StopSpaceBroadcastResponse.md +18 -0
  23. data/gen/generator-config.json +1 -1
  24. data/gen/templates/README.mustache +9 -3
  25. data/lib/mux_ruby/api/metrics_api.rb +4 -4
  26. data/lib/mux_ruby/api/real_time_api.rb +2 -2
  27. data/lib/mux_ruby/api/spaces_api.rb +619 -0
  28. data/lib/mux_ruby/models/asset.rb +1 -1
  29. data/lib/mux_ruby/models/broadcast.rb +305 -0
  30. data/lib/mux_ruby/models/broadcast_layout.rb +37 -0
  31. data/lib/mux_ruby/models/broadcast_resolution.rb +41 -0
  32. data/lib/mux_ruby/models/broadcast_response.rb +223 -0
  33. data/lib/mux_ruby/models/broadcast_status.rb +37 -0
  34. data/lib/mux_ruby/models/create_broadcast_request.rb +266 -0
  35. data/lib/mux_ruby/models/create_simulcast_target_request.rb +1 -1
  36. data/lib/mux_ruby/models/create_space_request.rb +242 -0
  37. data/lib/mux_ruby/models/list_spaces_response.rb +225 -0
  38. data/lib/mux_ruby/models/space.rb +301 -0
  39. data/lib/mux_ruby/models/space_response.rb +223 -0
  40. data/lib/mux_ruby/models/space_status.rb +37 -0
  41. data/lib/mux_ruby/models/space_type.rb +36 -0
  42. data/lib/mux_ruby/models/start_space_broadcast_response.rb +218 -0
  43. data/lib/mux_ruby/models/stop_space_broadcast_response.rb +218 -0
  44. data/lib/mux_ruby/version.rb +1 -1
  45. data/lib/mux_ruby.rb +15 -0
  46. data/spec/api/spaces_api_spec.rb +149 -0
  47. data/spec/models/broadcast_layout_spec.rb +28 -0
  48. data/spec/models/broadcast_resolution_spec.rb +28 -0
  49. data/spec/models/broadcast_response_spec.rb +34 -0
  50. data/spec/models/broadcast_spec.rb +70 -0
  51. data/spec/models/broadcast_status_spec.rb +28 -0
  52. data/spec/models/create_broadcast_request_spec.rb +58 -0
  53. data/spec/models/create_space_request_spec.rb +46 -0
  54. data/spec/models/list_spaces_response_spec.rb +34 -0
  55. data/spec/models/space_response_spec.rb +34 -0
  56. data/spec/models/space_spec.rb +70 -0
  57. data/spec/models/space_status_spec.rb +28 -0
  58. data/spec/models/space_type_spec.rb +28 -0
  59. data/spec/models/start_space_broadcast_response_spec.rb +34 -0
  60. data/spec/models/stop_space_broadcast_response_spec.rb +34 -0
  61. metadata +163 -103
@@ -0,0 +1,619 @@
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 SpacesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a space
23
+ # Create a new space. Spaces are used to build [real-time video applications.](https://mux.com/real-time-video)
24
+ # @param create_space_request [CreateSpaceRequest]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [SpaceResponse]
27
+ def create_space(create_space_request, opts = {})
28
+ data, _status_code, _headers = create_space_with_http_info(create_space_request, opts)
29
+ data
30
+ end
31
+
32
+ # Create a space
33
+ # Create a new space. Spaces are used to build [real-time video applications.](https://mux.com/real-time-video)
34
+ # @param create_space_request [CreateSpaceRequest]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(SpaceResponse, Integer, Hash)>] SpaceResponse data, response status code and response headers
37
+ def create_space_with_http_info(create_space_request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: SpacesApi.create_space ...'
40
+ end
41
+ # verify the required parameter 'create_space_request' is set
42
+ if @api_client.config.client_side_validation && create_space_request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_space_request' when calling SpacesApi.create_space"
44
+ end
45
+ # resource path
46
+ local_var_path = '/video/v1/spaces'
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_space_request)
63
+
64
+ # return_type
65
+ return_type = opts[:debug_return_type] || 'SpaceResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:debug_auth_names] || ['accessToken']
69
+
70
+ new_options = opts.merge(
71
+ :operation => :"SpacesApi.create_space",
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: SpacesApi#create_space\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+
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.
89
+ # @param space_id [String] The space ID.
90
+ # @param create_broadcast_request [CreateBroadcastRequest]
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [BroadcastResponse]
93
+ def create_space_broadcast(space_id, create_broadcast_request, opts = {})
94
+ data, _status_code, _headers = create_space_broadcast_with_http_info(space_id, create_broadcast_request, opts)
95
+ data
96
+ end
97
+
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.
100
+ # @param space_id [String] The space ID.
101
+ # @param create_broadcast_request [CreateBroadcastRequest]
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(BroadcastResponse, Integer, Hash)>] BroadcastResponse data, response status code and response headers
104
+ def create_space_broadcast_with_http_info(space_id, create_broadcast_request, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: SpacesApi.create_space_broadcast ...'
107
+ end
108
+ # verify the required parameter 'space_id' is set
109
+ if @api_client.config.client_side_validation && space_id.nil?
110
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.create_space_broadcast"
111
+ end
112
+ # verify the required parameter 'create_broadcast_request' is set
113
+ if @api_client.config.client_side_validation && create_broadcast_request.nil?
114
+ fail ArgumentError, "Missing the required parameter 'create_broadcast_request' when calling SpacesApi.create_space_broadcast"
115
+ end
116
+ # resource path
117
+ local_var_path = '/video/v1/spaces/{SPACE_ID}/broadcasts'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s))
118
+
119
+ # query parameters
120
+ query_params = opts[:query_params] || {}
121
+
122
+ # header parameters
123
+ header_params = opts[:header_params] || {}
124
+ # HTTP header 'Accept' (if needed)
125
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
126
+ # HTTP header 'Content-Type'
127
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_broadcast_request)
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type] || 'BroadcastResponse'
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['accessToken']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"SpacesApi.create_space_broadcast",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: SpacesApi#create_space_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Delete a space
159
+ # Deletes a space. Spaces can only be deleted when `idle`.
160
+ # @param space_id [String] The space ID.
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [nil]
163
+ def delete_space(space_id, opts = {})
164
+ delete_space_with_http_info(space_id, opts)
165
+ nil
166
+ end
167
+
168
+ # Delete a space
169
+ # Deletes a space. Spaces can only be deleted when &#x60;idle&#x60;.
170
+ # @param space_id [String] The space ID.
171
+ # @param [Hash] opts the optional parameters
172
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
173
+ def delete_space_with_http_info(space_id, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: SpacesApi.delete_space ...'
176
+ end
177
+ # verify the required parameter 'space_id' is set
178
+ if @api_client.config.client_side_validation && space_id.nil?
179
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.delete_space"
180
+ end
181
+ # resource path
182
+ local_var_path = '/video/v1/spaces/{SPACE_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s))
183
+
184
+ # query parameters
185
+ query_params = opts[:query_params] || {}
186
+
187
+ # header parameters
188
+ header_params = opts[:header_params] || {}
189
+
190
+ # form parameters
191
+ form_params = opts[:form_params] || {}
192
+
193
+ # http body (model)
194
+ post_body = opts[:debug_body]
195
+
196
+ # return_type
197
+ return_type = opts[:debug_return_type]
198
+
199
+ # auth_names
200
+ auth_names = opts[:debug_auth_names] || ['accessToken']
201
+
202
+ new_options = opts.merge(
203
+ :operation => :"SpacesApi.delete_space",
204
+ :header_params => header_params,
205
+ :query_params => query_params,
206
+ :form_params => form_params,
207
+ :body => post_body,
208
+ :auth_names => auth_names,
209
+ :return_type => return_type
210
+ )
211
+
212
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
213
+ if @api_client.config.debugging
214
+ @api_client.config.logger.debug "API called: SpacesApi#delete_space\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
215
+ end
216
+ return data, status_code, headers
217
+ end
218
+
219
+ # Delete a space broadcast
220
+ # Deletes a single broadcast of a specific space. Broadcasts can only be deleted when `idle`.
221
+ # @param space_id [String] The space ID.
222
+ # @param broadcast_id [String] The broadcast ID.
223
+ # @param [Hash] opts the optional parameters
224
+ # @return [nil]
225
+ def delete_space_broadcast(space_id, broadcast_id, opts = {})
226
+ delete_space_broadcast_with_http_info(space_id, broadcast_id, opts)
227
+ nil
228
+ end
229
+
230
+ # Delete a space broadcast
231
+ # Deletes a single broadcast of a specific space. Broadcasts can only be deleted when &#x60;idle&#x60;.
232
+ # @param space_id [String] The space ID.
233
+ # @param broadcast_id [String] The broadcast ID.
234
+ # @param [Hash] opts the optional parameters
235
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
236
+ def delete_space_broadcast_with_http_info(space_id, broadcast_id, opts = {})
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug 'Calling API: SpacesApi.delete_space_broadcast ...'
239
+ end
240
+ # verify the required parameter 'space_id' is set
241
+ if @api_client.config.client_side_validation && space_id.nil?
242
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.delete_space_broadcast"
243
+ end
244
+ # verify the required parameter 'broadcast_id' is set
245
+ if @api_client.config.client_side_validation && broadcast_id.nil?
246
+ fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.delete_space_broadcast"
247
+ end
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))
250
+
251
+ # query parameters
252
+ query_params = opts[:query_params] || {}
253
+
254
+ # header parameters
255
+ header_params = opts[:header_params] || {}
256
+
257
+ # form parameters
258
+ form_params = opts[:form_params] || {}
259
+
260
+ # http body (model)
261
+ post_body = opts[:debug_body]
262
+
263
+ # return_type
264
+ return_type = opts[:debug_return_type]
265
+
266
+ # auth_names
267
+ auth_names = opts[:debug_auth_names] || ['accessToken']
268
+
269
+ new_options = opts.merge(
270
+ :operation => :"SpacesApi.delete_space_broadcast",
271
+ :header_params => header_params,
272
+ :query_params => query_params,
273
+ :form_params => form_params,
274
+ :body => post_body,
275
+ :auth_names => auth_names,
276
+ :return_type => return_type
277
+ )
278
+
279
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "API called: SpacesApi#delete_space_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
282
+ end
283
+ return data, status_code, headers
284
+ end
285
+
286
+ # Retrieve a space
287
+ # Retrieves the details of a space that has previously been created. Supply the unique space ID that was returned from your create space request, and Mux will return the information about the corresponding space. The same information is returned when creating a space.
288
+ # @param space_id [String] The space ID.
289
+ # @param [Hash] opts the optional parameters
290
+ # @return [SpaceResponse]
291
+ def get_space(space_id, opts = {})
292
+ data, _status_code, _headers = get_space_with_http_info(space_id, opts)
293
+ data
294
+ end
295
+
296
+ # Retrieve a space
297
+ # Retrieves the details of a space that has previously been created. Supply the unique space ID that was returned from your create space request, and Mux will return the information about the corresponding space. The same information is returned when creating a space.
298
+ # @param space_id [String] The space ID.
299
+ # @param [Hash] opts the optional parameters
300
+ # @return [Array<(SpaceResponse, Integer, Hash)>] SpaceResponse data, response status code and response headers
301
+ def get_space_with_http_info(space_id, opts = {})
302
+ if @api_client.config.debugging
303
+ @api_client.config.logger.debug 'Calling API: SpacesApi.get_space ...'
304
+ end
305
+ # verify the required parameter 'space_id' is set
306
+ if @api_client.config.client_side_validation && space_id.nil?
307
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.get_space"
308
+ end
309
+ # resource path
310
+ local_var_path = '/video/v1/spaces/{SPACE_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s))
311
+
312
+ # query parameters
313
+ query_params = opts[:query_params] || {}
314
+
315
+ # header parameters
316
+ header_params = opts[:header_params] || {}
317
+ # HTTP header 'Accept' (if needed)
318
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
319
+
320
+ # form parameters
321
+ form_params = opts[:form_params] || {}
322
+
323
+ # http body (model)
324
+ post_body = opts[:debug_body]
325
+
326
+ # return_type
327
+ return_type = opts[:debug_return_type] || 'SpaceResponse'
328
+
329
+ # auth_names
330
+ auth_names = opts[:debug_auth_names] || ['accessToken']
331
+
332
+ new_options = opts.merge(
333
+ :operation => :"SpacesApi.get_space",
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(:GET, local_var_path, new_options)
343
+ if @api_client.config.debugging
344
+ @api_client.config.logger.debug "API called: SpacesApi#get_space\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
345
+ end
346
+ return data, status_code, headers
347
+ end
348
+
349
+ # Retrieve space broadcast
350
+ # Retrieves the details of a broadcast of a specific space.
351
+ # @param space_id [String] The space ID.
352
+ # @param broadcast_id [String] The broadcast ID.
353
+ # @param [Hash] opts the optional parameters
354
+ # @return [BroadcastResponse]
355
+ def get_space_broadcast(space_id, broadcast_id, opts = {})
356
+ data, _status_code, _headers = get_space_broadcast_with_http_info(space_id, broadcast_id, opts)
357
+ data
358
+ end
359
+
360
+ # Retrieve space broadcast
361
+ # Retrieves the details of a broadcast of a specific space.
362
+ # @param space_id [String] The space ID.
363
+ # @param broadcast_id [String] The broadcast ID.
364
+ # @param [Hash] opts the optional parameters
365
+ # @return [Array<(BroadcastResponse, Integer, Hash)>] BroadcastResponse data, response status code and response headers
366
+ def get_space_broadcast_with_http_info(space_id, broadcast_id, opts = {})
367
+ if @api_client.config.debugging
368
+ @api_client.config.logger.debug 'Calling API: SpacesApi.get_space_broadcast ...'
369
+ end
370
+ # verify the required parameter 'space_id' is set
371
+ if @api_client.config.client_side_validation && space_id.nil?
372
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.get_space_broadcast"
373
+ end
374
+ # verify the required parameter 'broadcast_id' is set
375
+ if @api_client.config.client_side_validation && broadcast_id.nil?
376
+ fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.get_space_broadcast"
377
+ end
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))
380
+
381
+ # query parameters
382
+ query_params = opts[:query_params] || {}
383
+
384
+ # header parameters
385
+ header_params = opts[:header_params] || {}
386
+ # HTTP header 'Accept' (if needed)
387
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
388
+
389
+ # form parameters
390
+ form_params = opts[:form_params] || {}
391
+
392
+ # http body (model)
393
+ post_body = opts[:debug_body]
394
+
395
+ # return_type
396
+ return_type = opts[:debug_return_type] || 'BroadcastResponse'
397
+
398
+ # auth_names
399
+ auth_names = opts[:debug_auth_names] || ['accessToken']
400
+
401
+ new_options = opts.merge(
402
+ :operation => :"SpacesApi.get_space_broadcast",
403
+ :header_params => header_params,
404
+ :query_params => query_params,
405
+ :form_params => form_params,
406
+ :body => post_body,
407
+ :auth_names => auth_names,
408
+ :return_type => return_type
409
+ )
410
+
411
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug "API called: SpacesApi#get_space_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
414
+ end
415
+ return data, status_code, headers
416
+ end
417
+
418
+ # List spaces
419
+ # List all spaces in the current enviroment.
420
+ # @param [Hash] opts the optional parameters
421
+ # @option opts [Integer] :limit Number of items to include in the response (default to 25)
422
+ # @option opts [Integer] :page Offset by this many pages, of the size of &#x60;limit&#x60; (default to 1)
423
+ # @return [ListSpacesResponse]
424
+ def list_spaces(opts = {})
425
+ data, _status_code, _headers = list_spaces_with_http_info(opts)
426
+ data
427
+ end
428
+
429
+ # List spaces
430
+ # List all spaces in the current enviroment.
431
+ # @param [Hash] opts the optional parameters
432
+ # @option opts [Integer] :limit Number of items to include in the response
433
+ # @option opts [Integer] :page Offset by this many pages, of the size of &#x60;limit&#x60;
434
+ # @return [Array<(ListSpacesResponse, Integer, Hash)>] ListSpacesResponse data, response status code and response headers
435
+ def list_spaces_with_http_info(opts = {})
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug 'Calling API: SpacesApi.list_spaces ...'
438
+ end
439
+ # resource path
440
+ local_var_path = '/video/v1/spaces'
441
+
442
+ # query parameters
443
+ query_params = opts[:query_params] || {}
444
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
445
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
446
+
447
+ # header parameters
448
+ header_params = opts[:header_params] || {}
449
+ # HTTP header 'Accept' (if needed)
450
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
451
+
452
+ # form parameters
453
+ form_params = opts[:form_params] || {}
454
+
455
+ # http body (model)
456
+ post_body = opts[:debug_body]
457
+
458
+ # return_type
459
+ return_type = opts[:debug_return_type] || 'ListSpacesResponse'
460
+
461
+ # auth_names
462
+ auth_names = opts[:debug_auth_names] || ['accessToken']
463
+
464
+ new_options = opts.merge(
465
+ :operation => :"SpacesApi.list_spaces",
466
+ :header_params => header_params,
467
+ :query_params => query_params,
468
+ :form_params => form_params,
469
+ :body => post_body,
470
+ :auth_names => auth_names,
471
+ :return_type => return_type
472
+ )
473
+
474
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
475
+ if @api_client.config.debugging
476
+ @api_client.config.logger.debug "API called: SpacesApi#list_spaces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
477
+ end
478
+ return data, status_code, headers
479
+ end
480
+
481
+ # Start a space broadcast
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
+ # @param space_id [String] The space ID.
484
+ # @param broadcast_id [String] The broadcast ID.
485
+ # @param [Hash] opts the optional parameters
486
+ # @return [StartSpaceBroadcastResponse]
487
+ def start_space_broadcast(space_id, broadcast_id, opts = {})
488
+ data, _status_code, _headers = start_space_broadcast_with_http_info(space_id, broadcast_id, opts)
489
+ data
490
+ end
491
+
492
+ # Start a space broadcast
493
+ # Starts broadcasting a space to the associated destination. Broadcasts can only be started when the space is &#x60;active&#x60; (when there are participants connected).
494
+ # @param space_id [String] The space ID.
495
+ # @param broadcast_id [String] The broadcast ID.
496
+ # @param [Hash] opts the optional parameters
497
+ # @return [Array<(StartSpaceBroadcastResponse, Integer, Hash)>] StartSpaceBroadcastResponse data, response status code and response headers
498
+ def start_space_broadcast_with_http_info(space_id, broadcast_id, opts = {})
499
+ if @api_client.config.debugging
500
+ @api_client.config.logger.debug 'Calling API: SpacesApi.start_space_broadcast ...'
501
+ end
502
+ # verify the required parameter 'space_id' is set
503
+ if @api_client.config.client_side_validation && space_id.nil?
504
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.start_space_broadcast"
505
+ end
506
+ # verify the required parameter 'broadcast_id' is set
507
+ if @api_client.config.client_side_validation && broadcast_id.nil?
508
+ fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.start_space_broadcast"
509
+ end
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))
512
+
513
+ # query parameters
514
+ query_params = opts[:query_params] || {}
515
+
516
+ # header parameters
517
+ header_params = opts[:header_params] || {}
518
+ # HTTP header 'Accept' (if needed)
519
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
520
+
521
+ # form parameters
522
+ form_params = opts[:form_params] || {}
523
+
524
+ # http body (model)
525
+ post_body = opts[:debug_body]
526
+
527
+ # return_type
528
+ return_type = opts[:debug_return_type] || 'StartSpaceBroadcastResponse'
529
+
530
+ # auth_names
531
+ auth_names = opts[:debug_auth_names] || ['accessToken']
532
+
533
+ new_options = opts.merge(
534
+ :operation => :"SpacesApi.start_space_broadcast",
535
+ :header_params => header_params,
536
+ :query_params => query_params,
537
+ :form_params => form_params,
538
+ :body => post_body,
539
+ :auth_names => auth_names,
540
+ :return_type => return_type
541
+ )
542
+
543
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
544
+ if @api_client.config.debugging
545
+ @api_client.config.logger.debug "API called: SpacesApi#start_space_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
546
+ end
547
+ return data, status_code, headers
548
+ end
549
+
550
+ # Stop a space broadcast
551
+ # Stops broadcasting a space, causing the destination live stream to become idle. This API also automatically calls `complete` on the destination live stream. Broadcasts are also automatically stopped when a space becomes idle.
552
+ # @param space_id [String] The space ID.
553
+ # @param broadcast_id [String] The broadcast ID.
554
+ # @param [Hash] opts the optional parameters
555
+ # @return [StopSpaceBroadcastResponse]
556
+ def stop_space_broadcast(space_id, broadcast_id, opts = {})
557
+ data, _status_code, _headers = stop_space_broadcast_with_http_info(space_id, broadcast_id, opts)
558
+ data
559
+ end
560
+
561
+ # Stop a space broadcast
562
+ # Stops broadcasting a space, causing the destination live stream to become idle. This API also automatically calls &#x60;complete&#x60; on the destination live stream. Broadcasts are also automatically stopped when a space becomes idle.
563
+ # @param space_id [String] The space ID.
564
+ # @param broadcast_id [String] The broadcast ID.
565
+ # @param [Hash] opts the optional parameters
566
+ # @return [Array<(StopSpaceBroadcastResponse, Integer, Hash)>] StopSpaceBroadcastResponse data, response status code and response headers
567
+ def stop_space_broadcast_with_http_info(space_id, broadcast_id, opts = {})
568
+ if @api_client.config.debugging
569
+ @api_client.config.logger.debug 'Calling API: SpacesApi.stop_space_broadcast ...'
570
+ end
571
+ # verify the required parameter 'space_id' is set
572
+ if @api_client.config.client_side_validation && space_id.nil?
573
+ fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.stop_space_broadcast"
574
+ end
575
+ # verify the required parameter 'broadcast_id' is set
576
+ if @api_client.config.client_side_validation && broadcast_id.nil?
577
+ fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.stop_space_broadcast"
578
+ end
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))
581
+
582
+ # query parameters
583
+ query_params = opts[:query_params] || {}
584
+
585
+ # header parameters
586
+ header_params = opts[:header_params] || {}
587
+ # HTTP header 'Accept' (if needed)
588
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
589
+
590
+ # form parameters
591
+ form_params = opts[:form_params] || {}
592
+
593
+ # http body (model)
594
+ post_body = opts[:debug_body]
595
+
596
+ # return_type
597
+ return_type = opts[:debug_return_type] || 'StopSpaceBroadcastResponse'
598
+
599
+ # auth_names
600
+ auth_names = opts[:debug_auth_names] || ['accessToken']
601
+
602
+ new_options = opts.merge(
603
+ :operation => :"SpacesApi.stop_space_broadcast",
604
+ :header_params => header_params,
605
+ :query_params => query_params,
606
+ :form_params => form_params,
607
+ :body => post_body,
608
+ :auth_names => auth_names,
609
+ :return_type => return_type
610
+ )
611
+
612
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
613
+ if @api_client.config.debugging
614
+ @api_client.config.logger.debug "API called: SpacesApi#stop_space_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
615
+ end
616
+ return data, status_code, headers
617
+ end
618
+ end
619
+ end
@@ -49,7 +49,7 @@ module MuxRuby
49
49
  # Unique identifier for the Direct Upload. This is an optional parameter added when the asset is created from a direct upload.
50
50
  attr_accessor :upload_id
51
51
 
52
- # Whether the asset is created from a live stream and the live stream is currently `active` and not in `idle` state.
52
+ # Indicates whether the live stream that created this asset is currently `active` and not in `idle` state. This is an optional parameter added when the asset is created from a live stream.
53
53
  attr_accessor :is_live
54
54
 
55
55
  # Arbitrary user-supplied metadata set for the asset. Max 255 characters.