Class: MuxRuby::LiveStreamsApi
- Inherits:
-
Object
- Object
- MuxRuby::LiveStreamsApi
- Defined in:
- lib/mux_ruby/api/live_streams_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_live_stream(create_live_stream_request, opts = {}) ⇒ LiveStreamResponse
Create a live stream.
-
#create_live_stream_playback_id(live_stream_id, create_playback_id_request, opts = {}) ⇒ CreatePlaybackIDResponse
Create a live stream playback ID.
-
#create_live_stream_playback_id_with_http_info(live_stream_id, create_playback_id_request, opts = {}) ⇒ Array<(CreatePlaybackIDResponse, Fixnum, Hash)>
Create a live stream playback ID.
-
#create_live_stream_with_http_info(create_live_stream_request, opts = {}) ⇒ Array<(LiveStreamResponse, Fixnum, Hash)>
Create a live stream.
-
#delete_live_stream(live_stream_id, opts = {}) ⇒ nil
Delete a live stream.
-
#delete_live_stream_playback_id(live_stream_id, playback_id, opts = {}) ⇒ nil
Delete a live stream playback ID.
-
#delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a live stream playback ID.
-
#delete_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a live stream.
-
#get_live_stream(live_stream_id, opts = {}) ⇒ LiveStreamResponse
Retrieve a live stream Retrieves the details of a live stream that has previously been created.
-
#get_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(LiveStreamResponse, Fixnum, Hash)>
Retrieve a live stream Retrieves the details of a live stream that has previously been created.
-
#initialize(api_client = ApiClient.default) ⇒ LiveStreamsApi
constructor
A new instance of LiveStreamsApi.
-
#list_live_streams(opts = {}) ⇒ ListLiveStreamsResponse
List live streams.
-
#list_live_streams_with_http_info(opts = {}) ⇒ Array<(ListLiveStreamsResponse, Fixnum, Hash)>
List live streams.
-
#reset_stream_key(live_stream_id, opts = {}) ⇒ LiveStreamResponse
Reset a live stream’s stream key Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts.
-
#reset_stream_key_with_http_info(live_stream_id, opts = {}) ⇒ Array<(LiveStreamResponse, Fixnum, Hash)>
Reset a live stream’s stream key Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts.
-
#signal_live_stream_complete(live_stream_id, opts = {}) ⇒ SignalLiveStreamCompleteResponse
Signal a live stream is finished (Optional) Make the recorded asset available immediately instead of waiting for the reconnect_window.
-
#signal_live_stream_complete_with_http_info(live_stream_id, opts = {}) ⇒ Array<(SignalLiveStreamCompleteResponse, Fixnum, Hash)>
Signal a live stream is finished (Optional) Make the recorded asset available immediately instead of waiting for the reconnect_window.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LiveStreamsApi
Returns a new instance of LiveStreamsApi.
12 13 14 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 12 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
10 11 12 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 10 def api_client @api_client end |
Instance Method Details
#create_live_stream(create_live_stream_request, opts = {}) ⇒ LiveStreamResponse
Create a live stream
19 20 21 22 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 19 def create_live_stream(create_live_stream_request, opts = {}) data, _status_code, _headers = create_live_stream_with_http_info(create_live_stream_request, opts) data end |
#create_live_stream_playback_id(live_stream_id, create_playback_id_request, opts = {}) ⇒ CreatePlaybackIDResponse
Create a live stream playback ID
73 74 75 76 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 73 def create_live_stream_playback_id(live_stream_id, create_playback_id_request, opts = {}) data, _status_code, _headers = create_live_stream_playback_id_with_http_info(live_stream_id, create_playback_id_request, opts) data end |
#create_live_stream_playback_id_with_http_info(live_stream_id, create_playback_id_request, opts = {}) ⇒ Array<(CreatePlaybackIDResponse, Fixnum, Hash)>
Create a live stream playback ID
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 83 def create_live_stream_playback_id_with_http_info(live_stream_id, create_playback_id_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.create_live_stream_playback_id ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.create_live_stream_playback_id" end # verify the required parameter 'create_playback_id_request' is set if @api_client.config.client_side_validation && create_playback_id_request.nil? fail ArgumentError, "Missing the required parameter 'create_playback_id_request' when calling LiveStreamsApi.create_live_stream_playback_id" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s) # query parameters query_params = {} # header parameters 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 = {} # http body (model) post_body = @api_client.object_to_http_body(create_playback_id_request) auth_names = ['accessToken'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CreatePlaybackIDResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#create_live_stream_playback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_live_stream_with_http_info(create_live_stream_request, opts = {}) ⇒ Array<(LiveStreamResponse, Fixnum, Hash)>
Create a live stream
28 29 30 31 32 33 34 35 36 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 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 28 def create_live_stream_with_http_info(create_live_stream_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.create_live_stream ...' end # verify the required parameter 'create_live_stream_request' is set if @api_client.config.client_side_validation && create_live_stream_request.nil? fail ArgumentError, "Missing the required parameter 'create_live_stream_request' when calling LiveStreamsApi.create_live_stream" end # resource path local_var_path = '/video/v1/live-streams' # query parameters query_params = {} # header parameters 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 = {} # http body (model) post_body = @api_client.object_to_http_body(create_live_stream_request) auth_names = ['accessToken'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LiveStreamResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#create_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_live_stream(live_stream_id, opts = {}) ⇒ nil
Delete a live stream
131 132 133 134 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 131 def delete_live_stream(live_stream_id, opts = {}) delete_live_stream_with_http_info(live_stream_id, opts) nil end |
#delete_live_stream_playback_id(live_stream_id, playback_id, opts = {}) ⇒ nil
Delete a live stream playback ID
180 181 182 183 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 180 def delete_live_stream_playback_id(live_stream_id, playback_id, opts = {}) delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts) nil end |
#delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a live stream playback ID
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 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 190 def delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.delete_live_stream_playback_id ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.delete_live_stream_playback_id" end # verify the required parameter 'playback_id' is set if @api_client.config.client_side_validation && playback_id.nil? fail ArgumentError, "Missing the required parameter 'playback_id' when calling LiveStreamsApi.delete_live_stream_playback_id" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s).sub('{' + 'PLAYBACK_ID' + '}', playback_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['accessToken'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#delete_live_stream_playback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a live stream
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 140 def delete_live_stream_with_http_info(live_stream_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.delete_live_stream ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.delete_live_stream" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['accessToken'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#delete_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_live_stream(live_stream_id, opts = {}) ⇒ LiveStreamResponse
Retrieve a live stream Retrieves the details of a live stream that has previously been created. Supply the unique live stream ID that was returned from your previous request, and Mux will return the corresponding live stream information. The same information is returned when creating a live stream.
234 235 236 237 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 234 def get_live_stream(live_stream_id, opts = {}) data, _status_code, _headers = get_live_stream_with_http_info(live_stream_id, opts) data end |
#get_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(LiveStreamResponse, Fixnum, Hash)>
Retrieve a live stream Retrieves the details of a live stream that has previously been created. Supply the unique live stream ID that was returned from your previous request, and Mux will return the corresponding live stream information. The same information is returned when creating a live stream.
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 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 244 def get_live_stream_with_http_info(live_stream_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.get_live_stream ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.get_live_stream" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['accessToken'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LiveStreamResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#get_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_live_streams(opts = {}) ⇒ ListLiveStreamsResponse
List live streams
287 288 289 290 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 287 def list_live_streams(opts = {}) data, _status_code, _headers = list_live_streams_with_http_info(opts) data end |
#list_live_streams_with_http_info(opts = {}) ⇒ Array<(ListLiveStreamsResponse, Fixnum, Hash)>
List live streams
297 298 299 300 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 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 297 def list_live_streams_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.list_live_streams ...' end # resource path local_var_path = '/video/v1/live-streams' # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['accessToken'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ListLiveStreamsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#list_live_streams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reset_stream_key(live_stream_id, opts = {}) ⇒ LiveStreamResponse
Reset a live stream’s stream key Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts.
338 339 340 341 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 338 def reset_stream_key(live_stream_id, opts = {}) data, _status_code, _headers = reset_stream_key_with_http_info(live_stream_id, opts) data end |
#reset_stream_key_with_http_info(live_stream_id, opts = {}) ⇒ Array<(LiveStreamResponse, Fixnum, Hash)>
Reset a live stream’s stream key Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts.
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 348 def reset_stream_key_with_http_info(live_stream_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.reset_stream_key ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.reset_stream_key" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['accessToken'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'LiveStreamResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#reset_stream_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#signal_live_stream_complete(live_stream_id, opts = {}) ⇒ SignalLiveStreamCompleteResponse
Signal a live stream is finished (Optional) Make the recorded asset available immediately instead of waiting for the reconnect_window.
391 392 393 394 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 391 def signal_live_stream_complete(live_stream_id, opts = {}) data, _status_code, _headers = signal_live_stream_complete_with_http_info(live_stream_id, opts) data end |
#signal_live_stream_complete_with_http_info(live_stream_id, opts = {}) ⇒ Array<(SignalLiveStreamCompleteResponse, Fixnum, Hash)>
Signal a live stream is finished (Optional) Make the recorded asset available immediately instead of waiting for the reconnect_window.
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 401 def signal_live_stream_complete_with_http_info(live_stream_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.signal_live_stream_complete ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.signal_live_stream_complete" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/complete'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['accessToken'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SignalLiveStreamCompleteResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#signal_live_stream_complete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |