mux_ruby 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +79 -0
- data/LICENSE +7 -0
- data/README.md +121 -0
- data/Rakefile +10 -0
- data/docs/AbridgedVideoView.md +18 -0
- data/docs/Asset.md +27 -0
- data/docs/AssetErrors.md +9 -0
- data/docs/AssetMaster.md +9 -0
- data/docs/AssetResponse.md +8 -0
- data/docs/AssetStaticRenditions.md +9 -0
- data/docs/AssetStaticRenditionsFiles.md +13 -0
- data/docs/AssetsApi.md +476 -0
- data/docs/BreakdownValue.md +12 -0
- data/docs/CreateAssetRequest.md +13 -0
- data/docs/CreateLiveStreamRequest.md +9 -0
- data/docs/CreatePlaybackIDRequest.md +8 -0
- data/docs/CreatePlaybackIDResponse.md +8 -0
- data/docs/CreateUploadRequest.md +10 -0
- data/docs/DirectUploadsApi.md +214 -0
- data/docs/Error.md +15 -0
- data/docs/ErrorsApi.md +64 -0
- data/docs/ExportsApi.md +56 -0
- data/docs/FilterValue.md +9 -0
- data/docs/FiltersApi.md +118 -0
- data/docs/GetAssetInputInfoResponse.md +8 -0
- data/docs/GetAssetPlaybackIDResponse.md +8 -0
- data/docs/GetMetricTimeseriesDataResponse.md +10 -0
- data/docs/GetOverallValuesResponse.md +10 -0
- data/docs/InputFile.md +9 -0
- data/docs/InputInfo.md +9 -0
- data/docs/InputSettings.md +10 -0
- data/docs/InputSettingsOverlaySettings.md +14 -0
- data/docs/InputTrack.md +18 -0
- data/docs/Insight.md +13 -0
- data/docs/ListAllMetricValuesResponse.md +10 -0
- data/docs/ListAssetsResponse.md +8 -0
- data/docs/ListBreakdownValuesResponse.md +10 -0
- data/docs/ListErrorsResponse.md +10 -0
- data/docs/ListExportsResponse.md +10 -0
- data/docs/ListFilterValuesResponse.md +10 -0
- data/docs/ListFiltersResponse.md +10 -0
- data/docs/ListFiltersResponseData.md +9 -0
- data/docs/ListInsightsResponse.md +10 -0
- data/docs/ListLiveStreamsResponse.md +8 -0
- data/docs/ListSigningKeysResponse.md +8 -0
- data/docs/ListUploadsResponse.md +8 -0
- data/docs/ListVideoViewsResponse.md +10 -0
- data/docs/LiveStream.md +17 -0
- data/docs/LiveStreamResponse.md +8 -0
- data/docs/LiveStreamsApi.md +420 -0
- data/docs/Metric.md +12 -0
- data/docs/MetricsApi.md +322 -0
- data/docs/OverallValues.md +11 -0
- data/docs/PlaybackID.md +9 -0
- data/docs/PlaybackPolicy.md +7 -0
- data/docs/Score.md +13 -0
- data/docs/SignalLiveStreamCompleteResponse.md +8 -0
- data/docs/SigningKey.md +10 -0
- data/docs/SigningKeyResponse.md +8 -0
- data/docs/Track.md +17 -0
- data/docs/URLSigningKeysApi.md +215 -0
- data/docs/UpdateAssetMP4SupportRequest.md +8 -0
- data/docs/Upload.md +15 -0
- data/docs/UploadError.md +9 -0
- data/docs/UploadResponse.md +8 -0
- data/docs/VideoView.md +117 -0
- data/docs/VideoViewEvent.md +11 -0
- data/docs/VideoViewResponse.md +9 -0
- data/docs/VideoViewsApi.md +126 -0
- data/examples/data/exercise-errors.rb +23 -0
- data/examples/data/exercise-exports.rb +22 -0
- data/examples/data/exercise-filters.rb +29 -0
- data/examples/data/exercise-metrics.rb +52 -0
- data/examples/data/exercise-video-views.rb +30 -0
- data/examples/video/create-live-stream.rb +25 -0
- data/examples/video/exercise-assets.rb +95 -0
- data/examples/video/exercise-live-streams.rb +89 -0
- data/examples/video/exercise-signing-keys.rb +46 -0
- data/examples/video/exercise-uploads.rb +49 -0
- data/examples/video/ingest.rb +37 -0
- data/examples/video/list-everything.rb +48 -0
- data/github-ruby-sdk.png +0 -0
- data/lib/mux_ruby/api/assets_api.rb +507 -0
- data/lib/mux_ruby/api/direct_uploads_api.rb +224 -0
- data/lib/mux_ruby/api/errors_api.rb +69 -0
- data/lib/mux_ruby/api/exports_api.rb +63 -0
- data/lib/mux_ruby/api/filters_api.rb +128 -0
- data/lib/mux_ruby/api/live_streams_api.rb +440 -0
- data/lib/mux_ruby/api/metrics_api.rb +393 -0
- data/lib/mux_ruby/api/url_signing_keys_api.rb +219 -0
- data/lib/mux_ruby/api/video_views_api.rb +140 -0
- data/lib/mux_ruby/api_client.rb +400 -0
- data/lib/mux_ruby/api_error.rb +44 -0
- data/lib/mux_ruby/configuration.rb +244 -0
- data/lib/mux_ruby/models/abridged_video_view.rb +274 -0
- data/lib/mux_ruby/models/asset.rb +409 -0
- data/lib/mux_ruby/models/asset_errors.rb +195 -0
- data/lib/mux_ruby/models/asset_master.rb +193 -0
- data/lib/mux_ruby/models/asset_response.rb +184 -0
- data/lib/mux_ruby/models/asset_static_renditions.rb +232 -0
- data/lib/mux_ruby/models/asset_static_renditions_files.rb +279 -0
- data/lib/mux_ruby/models/breakdown_value.rb +220 -0
- data/lib/mux_ruby/models/create_asset_request.rb +267 -0
- data/lib/mux_ruby/models/create_live_stream_request.rb +195 -0
- data/lib/mux_ruby/models/create_playback_id_request.rb +184 -0
- data/lib/mux_ruby/models/create_playback_id_response.rb +184 -0
- data/lib/mux_ruby/models/create_upload_request.rb +235 -0
- data/lib/mux_ruby/models/error.rb +247 -0
- data/lib/mux_ruby/models/filter_value.rb +193 -0
- data/lib/mux_ruby/models/get_asset_input_info_response.rb +186 -0
- data/lib/mux_ruby/models/get_asset_playback_id_response.rb +184 -0
- data/lib/mux_ruby/models/get_metric_timeseries_data_response.rb +206 -0
- data/lib/mux_ruby/models/get_overall_values_response.rb +204 -0
- data/lib/mux_ruby/models/input_file.rb +195 -0
- data/lib/mux_ruby/models/input_info.rb +193 -0
- data/lib/mux_ruby/models/input_settings.rb +203 -0
- data/lib/mux_ruby/models/input_settings_overlay_settings.rb +238 -0
- data/lib/mux_ruby/models/input_track.rb +274 -0
- data/lib/mux_ruby/models/insight.rb +229 -0
- data/lib/mux_ruby/models/list_all_metric_values_response.rb +206 -0
- data/lib/mux_ruby/models/list_assets_response.rb +186 -0
- data/lib/mux_ruby/models/list_breakdown_values_response.rb +206 -0
- data/lib/mux_ruby/models/list_errors_response.rb +206 -0
- data/lib/mux_ruby/models/list_exports_response.rb +206 -0
- data/lib/mux_ruby/models/list_filter_values_response.rb +206 -0
- data/lib/mux_ruby/models/list_filters_response.rb +204 -0
- data/lib/mux_ruby/models/list_filters_response_data.rb +197 -0
- data/lib/mux_ruby/models/list_insights_response.rb +206 -0
- data/lib/mux_ruby/models/list_live_streams_response.rb +186 -0
- data/lib/mux_ruby/models/list_signing_keys_response.rb +186 -0
- data/lib/mux_ruby/models/list_uploads_response.rb +186 -0
- data/lib/mux_ruby/models/list_video_views_response.rb +206 -0
- data/lib/mux_ruby/models/live_stream.rb +269 -0
- data/lib/mux_ruby/models/live_stream_response.rb +184 -0
- data/lib/mux_ruby/models/metric.rb +220 -0
- data/lib/mux_ruby/models/overall_values.rb +211 -0
- data/lib/mux_ruby/models/playback_id.rb +193 -0
- data/lib/mux_ruby/models/playback_policy.rb +31 -0
- data/lib/mux_ruby/models/score.rb +231 -0
- data/lib/mux_ruby/models/signal_live_stream_complete_response.rb +184 -0
- data/lib/mux_ruby/models/signing_key.rb +202 -0
- data/lib/mux_ruby/models/signing_key_response.rb +184 -0
- data/lib/mux_ruby/models/track.rb +265 -0
- data/lib/mux_ruby/models/update_asset_mp4_support_request.rb +219 -0
- data/lib/mux_ruby/models/upload.rb +311 -0
- data/lib/mux_ruby/models/upload_error.rb +194 -0
- data/lib/mux_ruby/models/upload_response.rb +184 -0
- data/lib/mux_ruby/models/video_view.rb +1167 -0
- data/lib/mux_ruby/models/video_view_event.rb +211 -0
- data/lib/mux_ruby/models/video_view_response.rb +195 -0
- data/lib/mux_ruby/version.rb +8 -0
- data/lib/mux_ruby.rb +97 -0
- data/mux_ruby.gemspec +38 -0
- data/spec/api/assets_api_spec.rb +136 -0
- data/spec/api/direct_uploads_api_spec.rb +74 -0
- data/spec/api/errors_api_spec.rb +41 -0
- data/spec/api/exports_api_spec.rb +39 -0
- data/spec/api/filters_api_spec.rb +55 -0
- data/spec/api/live_streams_api_spec.rb +122 -0
- data/spec/api/metrics_api_spec.rb +110 -0
- data/spec/api/url_signing_keys_api_spec.rb +76 -0
- data/spec/api/video_views_api_spec.rb +58 -0
- data/spec/api_client_spec.rb +219 -0
- data/spec/configuration_spec.rb +35 -0
- data/spec/models/abridged_video_view_spec.rb +94 -0
- data/spec/models/asset_errors_spec.rb +40 -0
- data/spec/models/asset_master_spec.rb +40 -0
- data/spec/models/asset_response_spec.rb +34 -0
- data/spec/models/asset_spec.rb +156 -0
- data/spec/models/asset_static_renditions_files_spec.rb +72 -0
- data/spec/models/asset_static_renditions_spec.rb +44 -0
- data/spec/models/breakdown_value_spec.rb +58 -0
- data/spec/models/create_asset_request_spec.rb +68 -0
- data/spec/models/create_live_stream_request_spec.rb +40 -0
- data/spec/models/create_playback_id_request_spec.rb +34 -0
- data/spec/models/create_playback_id_response_spec.rb +34 -0
- data/spec/models/create_upload_request_spec.rb +46 -0
- data/spec/models/error_spec.rb +76 -0
- data/spec/models/filter_value_spec.rb +40 -0
- data/spec/models/get_asset_input_info_response_spec.rb +34 -0
- data/spec/models/get_asset_playback_id_response_spec.rb +34 -0
- data/spec/models/get_metric_timeseries_data_response_spec.rb +46 -0
- data/spec/models/get_overall_values_response_spec.rb +46 -0
- data/spec/models/input_file_spec.rb +40 -0
- data/spec/models/input_info_spec.rb +40 -0
- data/spec/models/input_settings_overlay_settings_spec.rb +70 -0
- data/spec/models/input_settings_spec.rb +46 -0
- data/spec/models/input_track_spec.rb +94 -0
- data/spec/models/insight_spec.rb +64 -0
- data/spec/models/list_all_metric_values_response_spec.rb +46 -0
- data/spec/models/list_assets_response_spec.rb +34 -0
- data/spec/models/list_breakdown_values_response_spec.rb +46 -0
- data/spec/models/list_errors_response_spec.rb +46 -0
- data/spec/models/list_exports_response_spec.rb +46 -0
- data/spec/models/list_filter_values_response_spec.rb +46 -0
- data/spec/models/list_filters_response_data_spec.rb +40 -0
- data/spec/models/list_filters_response_spec.rb +46 -0
- data/spec/models/list_insights_response_spec.rb +46 -0
- data/spec/models/list_live_streams_response_spec.rb +34 -0
- data/spec/models/list_signing_keys_response_spec.rb +34 -0
- data/spec/models/list_uploads_response_spec.rb +34 -0
- data/spec/models/list_video_views_response_spec.rb +46 -0
- data/spec/models/live_stream_response_spec.rb +34 -0
- data/spec/models/live_stream_spec.rb +88 -0
- data/spec/models/metric_spec.rb +58 -0
- data/spec/models/overall_values_spec.rb +52 -0
- data/spec/models/playback_id_spec.rb +40 -0
- data/spec/models/playback_policy_spec.rb +28 -0
- data/spec/models/score_spec.rb +64 -0
- data/spec/models/signal_live_stream_complete_response_spec.rb +34 -0
- data/spec/models/signing_key_response_spec.rb +34 -0
- data/spec/models/signing_key_spec.rb +46 -0
- data/spec/models/track_spec.rb +88 -0
- data/spec/models/update_asset_mp4_support_request_spec.rb +38 -0
- data/spec/models/upload_error_spec.rb +40 -0
- data/spec/models/upload_response_spec.rb +34 -0
- data/spec/models/upload_spec.rb +80 -0
- data/spec/models/video_view_event_spec.rb +52 -0
- data/spec/models/video_view_response_spec.rb +40 -0
- data/spec/models/video_view_spec.rb +688 -0
- data/spec/spec_helper.rb +104 -0
- metadata +514 -0
@@ -0,0 +1,440 @@
|
|
1
|
+
=begin
|
2
|
+
# Mux Ruby - Copyright 2019 Mux Inc.
|
3
|
+
# NOTE: This file is auto generated. Do not edit this file manually.
|
4
|
+
=end
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
|
8
|
+
module MuxRuby
|
9
|
+
class LiveStreamsApi
|
10
|
+
attr_accessor :api_client
|
11
|
+
|
12
|
+
def initialize(api_client = ApiClient.default)
|
13
|
+
@api_client = api_client
|
14
|
+
end
|
15
|
+
# Create a live stream
|
16
|
+
# @param create_live_stream_request
|
17
|
+
# @param [Hash] opts the optional parameters
|
18
|
+
# @return [LiveStreamResponse]
|
19
|
+
def create_live_stream(create_live_stream_request, opts = {})
|
20
|
+
data, _status_code, _headers = create_live_stream_with_http_info(create_live_stream_request, opts)
|
21
|
+
data
|
22
|
+
end
|
23
|
+
|
24
|
+
# Create a live stream
|
25
|
+
# @param create_live_stream_request
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [Array<(LiveStreamResponse, Fixnum, Hash)>] LiveStreamResponse data, response status code and response headers
|
28
|
+
def create_live_stream_with_http_info(create_live_stream_request, opts = {})
|
29
|
+
if @api_client.config.debugging
|
30
|
+
@api_client.config.logger.debug 'Calling API: LiveStreamsApi.create_live_stream ...'
|
31
|
+
end
|
32
|
+
# verify the required parameter 'create_live_stream_request' is set
|
33
|
+
if @api_client.config.client_side_validation && create_live_stream_request.nil?
|
34
|
+
fail ArgumentError, "Missing the required parameter 'create_live_stream_request' when calling LiveStreamsApi.create_live_stream"
|
35
|
+
end
|
36
|
+
# resource path
|
37
|
+
local_var_path = '/video/v1/live-streams'
|
38
|
+
|
39
|
+
# query parameters
|
40
|
+
query_params = {}
|
41
|
+
|
42
|
+
# header parameters
|
43
|
+
header_params = {}
|
44
|
+
# HTTP header 'Accept' (if needed)
|
45
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
46
|
+
# HTTP header 'Content-Type'
|
47
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
48
|
+
|
49
|
+
# form parameters
|
50
|
+
form_params = {}
|
51
|
+
|
52
|
+
# http body (model)
|
53
|
+
post_body = @api_client.object_to_http_body(create_live_stream_request)
|
54
|
+
auth_names = ['accessToken']
|
55
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
56
|
+
:header_params => header_params,
|
57
|
+
:query_params => query_params,
|
58
|
+
:form_params => form_params,
|
59
|
+
:body => post_body,
|
60
|
+
:auth_names => auth_names,
|
61
|
+
:return_type => 'LiveStreamResponse')
|
62
|
+
if @api_client.config.debugging
|
63
|
+
@api_client.config.logger.debug "API called: LiveStreamsApi#create_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
64
|
+
end
|
65
|
+
return data, status_code, headers
|
66
|
+
end
|
67
|
+
|
68
|
+
# Create a live stream playback ID
|
69
|
+
# @param live_stream_id The live stream ID
|
70
|
+
# @param create_playback_id_request
|
71
|
+
# @param [Hash] opts the optional parameters
|
72
|
+
# @return [CreatePlaybackIDResponse]
|
73
|
+
def create_live_stream_playback_id(live_stream_id, create_playback_id_request, opts = {})
|
74
|
+
data, _status_code, _headers = create_live_stream_playback_id_with_http_info(live_stream_id, create_playback_id_request, opts)
|
75
|
+
data
|
76
|
+
end
|
77
|
+
|
78
|
+
# Create a live stream playback ID
|
79
|
+
# @param live_stream_id The live stream ID
|
80
|
+
# @param create_playback_id_request
|
81
|
+
# @param [Hash] opts the optional parameters
|
82
|
+
# @return [Array<(CreatePlaybackIDResponse, Fixnum, Hash)>] CreatePlaybackIDResponse data, response status code and response headers
|
83
|
+
def create_live_stream_playback_id_with_http_info(live_stream_id, create_playback_id_request, opts = {})
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug 'Calling API: LiveStreamsApi.create_live_stream_playback_id ...'
|
86
|
+
end
|
87
|
+
# verify the required parameter 'live_stream_id' is set
|
88
|
+
if @api_client.config.client_side_validation && live_stream_id.nil?
|
89
|
+
fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.create_live_stream_playback_id"
|
90
|
+
end
|
91
|
+
# verify the required parameter 'create_playback_id_request' is set
|
92
|
+
if @api_client.config.client_side_validation && create_playback_id_request.nil?
|
93
|
+
fail ArgumentError, "Missing the required parameter 'create_playback_id_request' when calling LiveStreamsApi.create_live_stream_playback_id"
|
94
|
+
end
|
95
|
+
# resource path
|
96
|
+
local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s)
|
97
|
+
|
98
|
+
# query parameters
|
99
|
+
query_params = {}
|
100
|
+
|
101
|
+
# header parameters
|
102
|
+
header_params = {}
|
103
|
+
# HTTP header 'Accept' (if needed)
|
104
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
105
|
+
# HTTP header 'Content-Type'
|
106
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
107
|
+
|
108
|
+
# form parameters
|
109
|
+
form_params = {}
|
110
|
+
|
111
|
+
# http body (model)
|
112
|
+
post_body = @api_client.object_to_http_body(create_playback_id_request)
|
113
|
+
auth_names = ['accessToken']
|
114
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
115
|
+
:header_params => header_params,
|
116
|
+
:query_params => query_params,
|
117
|
+
:form_params => form_params,
|
118
|
+
:body => post_body,
|
119
|
+
:auth_names => auth_names,
|
120
|
+
:return_type => 'CreatePlaybackIDResponse')
|
121
|
+
if @api_client.config.debugging
|
122
|
+
@api_client.config.logger.debug "API called: LiveStreamsApi#create_live_stream_playback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
123
|
+
end
|
124
|
+
return data, status_code, headers
|
125
|
+
end
|
126
|
+
|
127
|
+
# Delete a live stream
|
128
|
+
# @param live_stream_id The live stream ID
|
129
|
+
# @param [Hash] opts the optional parameters
|
130
|
+
# @return [nil]
|
131
|
+
def delete_live_stream(live_stream_id, opts = {})
|
132
|
+
delete_live_stream_with_http_info(live_stream_id, opts)
|
133
|
+
nil
|
134
|
+
end
|
135
|
+
|
136
|
+
# Delete a live stream
|
137
|
+
# @param live_stream_id The live stream ID
|
138
|
+
# @param [Hash] opts the optional parameters
|
139
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
140
|
+
def delete_live_stream_with_http_info(live_stream_id, opts = {})
|
141
|
+
if @api_client.config.debugging
|
142
|
+
@api_client.config.logger.debug 'Calling API: LiveStreamsApi.delete_live_stream ...'
|
143
|
+
end
|
144
|
+
# verify the required parameter 'live_stream_id' is set
|
145
|
+
if @api_client.config.client_side_validation && live_stream_id.nil?
|
146
|
+
fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.delete_live_stream"
|
147
|
+
end
|
148
|
+
# resource path
|
149
|
+
local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s)
|
150
|
+
|
151
|
+
# query parameters
|
152
|
+
query_params = {}
|
153
|
+
|
154
|
+
# header parameters
|
155
|
+
header_params = {}
|
156
|
+
|
157
|
+
# form parameters
|
158
|
+
form_params = {}
|
159
|
+
|
160
|
+
# http body (model)
|
161
|
+
post_body = nil
|
162
|
+
auth_names = ['accessToken']
|
163
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
164
|
+
:header_params => header_params,
|
165
|
+
:query_params => query_params,
|
166
|
+
:form_params => form_params,
|
167
|
+
:body => post_body,
|
168
|
+
:auth_names => auth_names)
|
169
|
+
if @api_client.config.debugging
|
170
|
+
@api_client.config.logger.debug "API called: LiveStreamsApi#delete_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
171
|
+
end
|
172
|
+
return data, status_code, headers
|
173
|
+
end
|
174
|
+
|
175
|
+
# Delete a live stream playback ID
|
176
|
+
# @param live_stream_id The live stream ID
|
177
|
+
# @param playback_id The live stream's playback ID.
|
178
|
+
# @param [Hash] opts the optional parameters
|
179
|
+
# @return [nil]
|
180
|
+
def delete_live_stream_playback_id(live_stream_id, playback_id, opts = {})
|
181
|
+
delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts)
|
182
|
+
nil
|
183
|
+
end
|
184
|
+
|
185
|
+
# Delete a live stream playback ID
|
186
|
+
# @param live_stream_id The live stream ID
|
187
|
+
# @param playback_id The live stream's playback ID.
|
188
|
+
# @param [Hash] opts the optional parameters
|
189
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
190
|
+
def delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts = {})
|
191
|
+
if @api_client.config.debugging
|
192
|
+
@api_client.config.logger.debug 'Calling API: LiveStreamsApi.delete_live_stream_playback_id ...'
|
193
|
+
end
|
194
|
+
# verify the required parameter 'live_stream_id' is set
|
195
|
+
if @api_client.config.client_side_validation && live_stream_id.nil?
|
196
|
+
fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.delete_live_stream_playback_id"
|
197
|
+
end
|
198
|
+
# verify the required parameter 'playback_id' is set
|
199
|
+
if @api_client.config.client_side_validation && playback_id.nil?
|
200
|
+
fail ArgumentError, "Missing the required parameter 'playback_id' when calling LiveStreamsApi.delete_live_stream_playback_id"
|
201
|
+
end
|
202
|
+
# resource path
|
203
|
+
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)
|
204
|
+
|
205
|
+
# query parameters
|
206
|
+
query_params = {}
|
207
|
+
|
208
|
+
# header parameters
|
209
|
+
header_params = {}
|
210
|
+
|
211
|
+
# form parameters
|
212
|
+
form_params = {}
|
213
|
+
|
214
|
+
# http body (model)
|
215
|
+
post_body = nil
|
216
|
+
auth_names = ['accessToken']
|
217
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
218
|
+
:header_params => header_params,
|
219
|
+
:query_params => query_params,
|
220
|
+
:form_params => form_params,
|
221
|
+
:body => post_body,
|
222
|
+
:auth_names => auth_names)
|
223
|
+
if @api_client.config.debugging
|
224
|
+
@api_client.config.logger.debug "API called: LiveStreamsApi#delete_live_stream_playback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
225
|
+
end
|
226
|
+
return data, status_code, headers
|
227
|
+
end
|
228
|
+
|
229
|
+
# Retrieve a live stream
|
230
|
+
# 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.
|
231
|
+
# @param live_stream_id The live stream ID
|
232
|
+
# @param [Hash] opts the optional parameters
|
233
|
+
# @return [LiveStreamResponse]
|
234
|
+
def get_live_stream(live_stream_id, opts = {})
|
235
|
+
data, _status_code, _headers = get_live_stream_with_http_info(live_stream_id, opts)
|
236
|
+
data
|
237
|
+
end
|
238
|
+
|
239
|
+
# Retrieve a live stream
|
240
|
+
# 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.
|
241
|
+
# @param live_stream_id The live stream ID
|
242
|
+
# @param [Hash] opts the optional parameters
|
243
|
+
# @return [Array<(LiveStreamResponse, Fixnum, Hash)>] LiveStreamResponse data, response status code and response headers
|
244
|
+
def get_live_stream_with_http_info(live_stream_id, opts = {})
|
245
|
+
if @api_client.config.debugging
|
246
|
+
@api_client.config.logger.debug 'Calling API: LiveStreamsApi.get_live_stream ...'
|
247
|
+
end
|
248
|
+
# verify the required parameter 'live_stream_id' is set
|
249
|
+
if @api_client.config.client_side_validation && live_stream_id.nil?
|
250
|
+
fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.get_live_stream"
|
251
|
+
end
|
252
|
+
# resource path
|
253
|
+
local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s)
|
254
|
+
|
255
|
+
# query parameters
|
256
|
+
query_params = {}
|
257
|
+
|
258
|
+
# header parameters
|
259
|
+
header_params = {}
|
260
|
+
# HTTP header 'Accept' (if needed)
|
261
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
262
|
+
|
263
|
+
# form parameters
|
264
|
+
form_params = {}
|
265
|
+
|
266
|
+
# http body (model)
|
267
|
+
post_body = nil
|
268
|
+
auth_names = ['accessToken']
|
269
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
270
|
+
:header_params => header_params,
|
271
|
+
:query_params => query_params,
|
272
|
+
:form_params => form_params,
|
273
|
+
:body => post_body,
|
274
|
+
:auth_names => auth_names,
|
275
|
+
:return_type => 'LiveStreamResponse')
|
276
|
+
if @api_client.config.debugging
|
277
|
+
@api_client.config.logger.debug "API called: LiveStreamsApi#get_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
278
|
+
end
|
279
|
+
return data, status_code, headers
|
280
|
+
end
|
281
|
+
|
282
|
+
# List live streams
|
283
|
+
# @param [Hash] opts the optional parameters
|
284
|
+
# @option opts [Integer] :limit Number of items to include in the response (default to 25)
|
285
|
+
# @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1)
|
286
|
+
# @return [ListLiveStreamsResponse]
|
287
|
+
def list_live_streams(opts = {})
|
288
|
+
data, _status_code, _headers = list_live_streams_with_http_info(opts)
|
289
|
+
data
|
290
|
+
end
|
291
|
+
|
292
|
+
# List live streams
|
293
|
+
# @param [Hash] opts the optional parameters
|
294
|
+
# @option opts [Integer] :limit Number of items to include in the response
|
295
|
+
# @option opts [Integer] :page Offset by this many pages, of the size of `limit`
|
296
|
+
# @return [Array<(ListLiveStreamsResponse, Fixnum, Hash)>] ListLiveStreamsResponse data, response status code and response headers
|
297
|
+
def list_live_streams_with_http_info(opts = {})
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug 'Calling API: LiveStreamsApi.list_live_streams ...'
|
300
|
+
end
|
301
|
+
# resource path
|
302
|
+
local_var_path = '/video/v1/live-streams'
|
303
|
+
|
304
|
+
# query parameters
|
305
|
+
query_params = {}
|
306
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
307
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
308
|
+
|
309
|
+
# header parameters
|
310
|
+
header_params = {}
|
311
|
+
# HTTP header 'Accept' (if needed)
|
312
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
313
|
+
|
314
|
+
# form parameters
|
315
|
+
form_params = {}
|
316
|
+
|
317
|
+
# http body (model)
|
318
|
+
post_body = nil
|
319
|
+
auth_names = ['accessToken']
|
320
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
321
|
+
:header_params => header_params,
|
322
|
+
:query_params => query_params,
|
323
|
+
:form_params => form_params,
|
324
|
+
:body => post_body,
|
325
|
+
:auth_names => auth_names,
|
326
|
+
:return_type => 'ListLiveStreamsResponse')
|
327
|
+
if @api_client.config.debugging
|
328
|
+
@api_client.config.logger.debug "API called: LiveStreamsApi#list_live_streams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
329
|
+
end
|
330
|
+
return data, status_code, headers
|
331
|
+
end
|
332
|
+
|
333
|
+
# Reset a live stream’s stream key
|
334
|
+
# 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.
|
335
|
+
# @param live_stream_id The live stream ID
|
336
|
+
# @param [Hash] opts the optional parameters
|
337
|
+
# @return [LiveStreamResponse]
|
338
|
+
def reset_stream_key(live_stream_id, opts = {})
|
339
|
+
data, _status_code, _headers = reset_stream_key_with_http_info(live_stream_id, opts)
|
340
|
+
data
|
341
|
+
end
|
342
|
+
|
343
|
+
# Reset a live stream’s stream key
|
344
|
+
# 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.
|
345
|
+
# @param live_stream_id The live stream ID
|
346
|
+
# @param [Hash] opts the optional parameters
|
347
|
+
# @return [Array<(LiveStreamResponse, Fixnum, Hash)>] LiveStreamResponse data, response status code and response headers
|
348
|
+
def reset_stream_key_with_http_info(live_stream_id, opts = {})
|
349
|
+
if @api_client.config.debugging
|
350
|
+
@api_client.config.logger.debug 'Calling API: LiveStreamsApi.reset_stream_key ...'
|
351
|
+
end
|
352
|
+
# verify the required parameter 'live_stream_id' is set
|
353
|
+
if @api_client.config.client_side_validation && live_stream_id.nil?
|
354
|
+
fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.reset_stream_key"
|
355
|
+
end
|
356
|
+
# resource path
|
357
|
+
local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s)
|
358
|
+
|
359
|
+
# query parameters
|
360
|
+
query_params = {}
|
361
|
+
|
362
|
+
# header parameters
|
363
|
+
header_params = {}
|
364
|
+
# HTTP header 'Accept' (if needed)
|
365
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
366
|
+
|
367
|
+
# form parameters
|
368
|
+
form_params = {}
|
369
|
+
|
370
|
+
# http body (model)
|
371
|
+
post_body = nil
|
372
|
+
auth_names = ['accessToken']
|
373
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
374
|
+
:header_params => header_params,
|
375
|
+
:query_params => query_params,
|
376
|
+
:form_params => form_params,
|
377
|
+
:body => post_body,
|
378
|
+
:auth_names => auth_names,
|
379
|
+
:return_type => 'LiveStreamResponse')
|
380
|
+
if @api_client.config.debugging
|
381
|
+
@api_client.config.logger.debug "API called: LiveStreamsApi#reset_stream_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
382
|
+
end
|
383
|
+
return data, status_code, headers
|
384
|
+
end
|
385
|
+
|
386
|
+
# Signal a live stream is finished
|
387
|
+
# (Optional) Make the recorded asset available immediately instead of waiting for the reconnect_window.
|
388
|
+
# @param live_stream_id The live stream ID
|
389
|
+
# @param [Hash] opts the optional parameters
|
390
|
+
# @return [SignalLiveStreamCompleteResponse]
|
391
|
+
def signal_live_stream_complete(live_stream_id, opts = {})
|
392
|
+
data, _status_code, _headers = signal_live_stream_complete_with_http_info(live_stream_id, opts)
|
393
|
+
data
|
394
|
+
end
|
395
|
+
|
396
|
+
# Signal a live stream is finished
|
397
|
+
# (Optional) Make the recorded asset available immediately instead of waiting for the reconnect_window.
|
398
|
+
# @param live_stream_id The live stream ID
|
399
|
+
# @param [Hash] opts the optional parameters
|
400
|
+
# @return [Array<(SignalLiveStreamCompleteResponse, Fixnum, Hash)>] SignalLiveStreamCompleteResponse data, response status code and response headers
|
401
|
+
def signal_live_stream_complete_with_http_info(live_stream_id, opts = {})
|
402
|
+
if @api_client.config.debugging
|
403
|
+
@api_client.config.logger.debug 'Calling API: LiveStreamsApi.signal_live_stream_complete ...'
|
404
|
+
end
|
405
|
+
# verify the required parameter 'live_stream_id' is set
|
406
|
+
if @api_client.config.client_side_validation && live_stream_id.nil?
|
407
|
+
fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.signal_live_stream_complete"
|
408
|
+
end
|
409
|
+
# resource path
|
410
|
+
local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/complete'.sub('{' + 'LIVE_STREAM_ID' + '}', live_stream_id.to_s)
|
411
|
+
|
412
|
+
# query parameters
|
413
|
+
query_params = {}
|
414
|
+
|
415
|
+
# header parameters
|
416
|
+
header_params = {}
|
417
|
+
# HTTP header 'Accept' (if needed)
|
418
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
419
|
+
|
420
|
+
# form parameters
|
421
|
+
form_params = {}
|
422
|
+
|
423
|
+
# http body (model)
|
424
|
+
post_body = nil
|
425
|
+
auth_names = ['accessToken']
|
426
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
427
|
+
:header_params => header_params,
|
428
|
+
:query_params => query_params,
|
429
|
+
:form_params => form_params,
|
430
|
+
:body => post_body,
|
431
|
+
:auth_names => auth_names,
|
432
|
+
:return_type => 'SignalLiveStreamCompleteResponse')
|
433
|
+
if @api_client.config.debugging
|
434
|
+
@api_client.config.logger.debug "API called: LiveStreamsApi#signal_live_stream_complete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
435
|
+
end
|
436
|
+
return data, status_code, headers
|
437
|
+
end
|
438
|
+
|
439
|
+
end
|
440
|
+
end
|