Class: MuxRuby::SpacesApi
- Inherits:
-
Object
- Object
- MuxRuby::SpacesApi
- Defined in:
- lib/mux_ruby/api/spaces_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_space(create_space_request, opts = {}) ⇒ SpaceResponse
Create a space Create a new space.
-
#create_space_broadcast(space_id, create_broadcast_request, opts = {}) ⇒ BroadcastResponse
Create a space broadcast Creates a new broadcast.
-
#create_space_broadcast_with_http_info(space_id, create_broadcast_request, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Create a space broadcast Creates a new broadcast.
-
#create_space_with_http_info(create_space_request, opts = {}) ⇒ Array<(SpaceResponse, Integer, Hash)>
Create a space Create a new space.
-
#delete_space(space_id, opts = {}) ⇒ nil
Delete a space Deletes a space.
-
#delete_space_broadcast(space_id, broadcast_id, opts = {}) ⇒ nil
Delete a space broadcast Deletes a single broadcast of a specific space.
-
#delete_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a space broadcast Deletes a single broadcast of a specific space.
-
#delete_space_with_http_info(space_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a space Deletes a space.
-
#get_space(space_id, opts = {}) ⇒ SpaceResponse
Retrieve a space Retrieves the details of a space that has previously been created.
-
#get_space_broadcast(space_id, broadcast_id, opts = {}) ⇒ BroadcastResponse
Retrieve space broadcast Retrieves the details of a broadcast of a specific space.
-
#get_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Retrieve space broadcast Retrieves the details of a broadcast of a specific space.
-
#get_space_with_http_info(space_id, opts = {}) ⇒ Array<(SpaceResponse, Integer, Hash)>
Retrieve a space Retrieves the details of a space that has previously been created.
-
#initialize(api_client = ApiClient.default) ⇒ SpacesApi
constructor
A new instance of SpacesApi.
-
#list_spaces(opts = {}) ⇒ ListSpacesResponse
List spaces List all spaces in the current environment.
-
#list_spaces_with_http_info(opts = {}) ⇒ Array<(ListSpacesResponse, Integer, Hash)>
List spaces List all spaces in the current environment.
-
#start_space_broadcast(space_id, broadcast_id, opts = {}) ⇒ StartSpaceBroadcastResponse
Start a space broadcast Starts broadcasting a space to the associated destination.
-
#start_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) ⇒ Array<(StartSpaceBroadcastResponse, Integer, Hash)>
Start a space broadcast Starts broadcasting a space to the associated destination.
-
#stop_space_broadcast(space_id, broadcast_id, opts = {}) ⇒ StopSpaceBroadcastResponse
Stop a space broadcast Stops broadcasting a space, causing the destination live stream to become idle.
-
#stop_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) ⇒ Array<(StopSpaceBroadcastResponse, Integer, Hash)>
Stop a space broadcast Stops broadcasting a space, causing the destination live stream to become idle.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_space(create_space_request, opts = {}) ⇒ SpaceResponse
Create a space Create a new space. Spaces are used to build [real-time video applications.](mux.com/real-time-video)
27 28 29 30 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 27 def create_space(create_space_request, opts = {}) data, _status_code, _headers = create_space_with_http_info(create_space_request, opts) data end |
#create_space_broadcast(space_id, create_broadcast_request, opts = {}) ⇒ BroadcastResponse
Create a space broadcast 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.
93 94 95 96 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 93 def create_space_broadcast(space_id, create_broadcast_request, opts = {}) data, _status_code, _headers = create_space_broadcast_with_http_info(space_id, create_broadcast_request, opts) data end |
#create_space_broadcast_with_http_info(space_id, create_broadcast_request, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Create a space broadcast 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.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 104 def create_space_broadcast_with_http_info(space_id, create_broadcast_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpacesApi.create_space_broadcast ...' end # verify the required parameter 'space_id' is set if @api_client.config.client_side_validation && space_id.nil? fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.create_space_broadcast" end # verify the required parameter 'create_broadcast_request' is set if @api_client.config.client_side_validation && create_broadcast_request.nil? fail ArgumentError, "Missing the required parameter 'create_broadcast_request' when calling SpacesApi.create_space_broadcast" end # resource path local_var_path = '/video/v1/spaces/{SPACE_ID}/broadcasts'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_broadcast_request) # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"SpacesApi.create_space_broadcast", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpacesApi#create_space_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_space_with_http_info(create_space_request, opts = {}) ⇒ Array<(SpaceResponse, Integer, Hash)>
Create a space Create a new space. Spaces are used to build [real-time video applications.](mux.com/real-time-video)
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 37 def create_space_with_http_info(create_space_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpacesApi.create_space ...' end # verify the required parameter 'create_space_request' is set if @api_client.config.client_side_validation && create_space_request.nil? fail ArgumentError, "Missing the required parameter 'create_space_request' when calling SpacesApi.create_space" end # resource path local_var_path = '/video/v1/spaces' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_space_request) # return_type return_type = opts[:debug_return_type] || 'SpaceResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"SpacesApi.create_space", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpacesApi#create_space\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_space(space_id, opts = {}) ⇒ nil
Delete a space Deletes a space. Spaces can only be deleted when ‘idle`.
163 164 165 166 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 163 def delete_space(space_id, opts = {}) delete_space_with_http_info(space_id, opts) nil end |
#delete_space_broadcast(space_id, broadcast_id, opts = {}) ⇒ nil
Delete a space broadcast Deletes a single broadcast of a specific space. Broadcasts can only be deleted when ‘idle`.
225 226 227 228 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 225 def delete_space_broadcast(space_id, broadcast_id, opts = {}) delete_space_broadcast_with_http_info(space_id, broadcast_id, opts) nil end |
#delete_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a space broadcast Deletes a single broadcast of a specific space. Broadcasts can only be deleted when `idle`.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 236 def delete_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpacesApi.delete_space_broadcast ...' end # verify the required parameter 'space_id' is set if @api_client.config.client_side_validation && space_id.nil? fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.delete_space_broadcast" end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.delete_space_broadcast" end # resource path 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)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"SpacesApi.delete_space_broadcast", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpacesApi#delete_space_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_space_with_http_info(space_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a space Deletes a space. Spaces can only be deleted when `idle`.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 173 def delete_space_with_http_info(space_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpacesApi.delete_space ...' end # verify the required parameter 'space_id' is set if @api_client.config.client_side_validation && space_id.nil? fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.delete_space" end # resource path local_var_path = '/video/v1/spaces/{SPACE_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"SpacesApi.delete_space", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpacesApi#delete_space\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_space(space_id, opts = {}) ⇒ SpaceResponse
Retrieve a space 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.
291 292 293 294 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 291 def get_space(space_id, opts = {}) data, _status_code, _headers = get_space_with_http_info(space_id, opts) data end |
#get_space_broadcast(space_id, broadcast_id, opts = {}) ⇒ BroadcastResponse
Retrieve space broadcast Retrieves the details of a broadcast of a specific space.
355 356 357 358 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 355 def get_space_broadcast(space_id, broadcast_id, opts = {}) data, _status_code, _headers = get_space_broadcast_with_http_info(space_id, broadcast_id, opts) data end |
#get_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Retrieve space broadcast Retrieves the details of a broadcast of a specific space.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 366 def get_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpacesApi.get_space_broadcast ...' end # verify the required parameter 'space_id' is set if @api_client.config.client_side_validation && space_id.nil? fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.get_space_broadcast" end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.get_space_broadcast" end # resource path 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)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"SpacesApi.get_space_broadcast", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpacesApi#get_space_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_space_with_http_info(space_id, opts = {}) ⇒ Array<(SpaceResponse, Integer, Hash)>
Retrieve a space 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.
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 301 def get_space_with_http_info(space_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpacesApi.get_space ...' end # verify the required parameter 'space_id' is set if @api_client.config.client_side_validation && space_id.nil? fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.get_space" end # resource path local_var_path = '/video/v1/spaces/{SPACE_ID}'.sub('{' + 'SPACE_ID' + '}', CGI.escape(space_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SpaceResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"SpacesApi.get_space", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpacesApi#get_space\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_spaces(opts = {}) ⇒ ListSpacesResponse
List spaces List all spaces in the current environment.
424 425 426 427 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 424 def list_spaces(opts = {}) data, _status_code, _headers = list_spaces_with_http_info(opts) data end |
#list_spaces_with_http_info(opts = {}) ⇒ Array<(ListSpacesResponse, Integer, Hash)>
List spaces List all spaces in the current environment.
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 435 def list_spaces_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpacesApi.list_spaces ...' end # resource path local_var_path = '/video/v1/spaces' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListSpacesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"SpacesApi.list_spaces", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpacesApi#list_spaces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#start_space_broadcast(space_id, broadcast_id, opts = {}) ⇒ StartSpaceBroadcastResponse
Start a space broadcast Starts broadcasting a space to the associated destination. Broadcasts can only be started when the space is ‘active` (when there are participants connected).
487 488 489 490 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 487 def start_space_broadcast(space_id, broadcast_id, opts = {}) data, _status_code, _headers = start_space_broadcast_with_http_info(space_id, broadcast_id, opts) data end |
#start_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) ⇒ Array<(StartSpaceBroadcastResponse, Integer, Hash)>
Start a space broadcast Starts broadcasting a space to the associated destination. Broadcasts can only be started when the space is `active` (when there are participants connected).
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 498 def start_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpacesApi.start_space_broadcast ...' end # verify the required parameter 'space_id' is set if @api_client.config.client_side_validation && space_id.nil? fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.start_space_broadcast" end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.start_space_broadcast" end # resource path 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)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'StartSpaceBroadcastResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"SpacesApi.start_space_broadcast", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpacesApi#start_space_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#stop_space_broadcast(space_id, broadcast_id, opts = {}) ⇒ StopSpaceBroadcastResponse
Stop a space broadcast 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.
556 557 558 559 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 556 def stop_space_broadcast(space_id, broadcast_id, opts = {}) data, _status_code, _headers = stop_space_broadcast_with_http_info(space_id, broadcast_id, opts) data end |
#stop_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) ⇒ Array<(StopSpaceBroadcastResponse, Integer, Hash)>
Stop a space broadcast 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.
567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 |
# File 'lib/mux_ruby/api/spaces_api.rb', line 567 def stop_space_broadcast_with_http_info(space_id, broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SpacesApi.stop_space_broadcast ...' end # verify the required parameter 'space_id' is set if @api_client.config.client_side_validation && space_id.nil? fail ArgumentError, "Missing the required parameter 'space_id' when calling SpacesApi.stop_space_broadcast" end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling SpacesApi.stop_space_broadcast" end # resource path 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)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'StopSpaceBroadcastResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"SpacesApi.stop_space_broadcast", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpacesApi#stop_space_broadcast\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |