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,224 @@
|
|
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 DirectUploadsApi
|
10
|
+
attr_accessor :api_client
|
11
|
+
|
12
|
+
def initialize(api_client = ApiClient.default)
|
13
|
+
@api_client = api_client
|
14
|
+
end
|
15
|
+
# Cancel a direct upload
|
16
|
+
# Cancels a direct upload and marks it as cancelled. If a pending upload finishes after this request, no asset will be created. This request will only succeed if the upload is still in the `waiting` state.
|
17
|
+
# @param upload_id ID of the Upload
|
18
|
+
# @param [Hash] opts the optional parameters
|
19
|
+
# @return [UploadResponse]
|
20
|
+
def cancel_direct_upload(upload_id, opts = {})
|
21
|
+
data, _status_code, _headers = cancel_direct_upload_with_http_info(upload_id, opts)
|
22
|
+
data
|
23
|
+
end
|
24
|
+
|
25
|
+
# Cancel a direct upload
|
26
|
+
# Cancels a direct upload and marks it as cancelled. If a pending upload finishes after this request, no asset will be created. This request will only succeed if the upload is still in the `waiting` state.
|
27
|
+
# @param upload_id ID of the Upload
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @return [Array<(UploadResponse, Fixnum, Hash)>] UploadResponse data, response status code and response headers
|
30
|
+
def cancel_direct_upload_with_http_info(upload_id, opts = {})
|
31
|
+
if @api_client.config.debugging
|
32
|
+
@api_client.config.logger.debug 'Calling API: DirectUploadsApi.cancel_direct_upload ...'
|
33
|
+
end
|
34
|
+
# verify the required parameter 'upload_id' is set
|
35
|
+
if @api_client.config.client_side_validation && upload_id.nil?
|
36
|
+
fail ArgumentError, "Missing the required parameter 'upload_id' when calling DirectUploadsApi.cancel_direct_upload"
|
37
|
+
end
|
38
|
+
# resource path
|
39
|
+
local_var_path = '/video/v1/uploads/{UPLOAD_ID}/cancel'.sub('{' + 'UPLOAD_ID' + '}', upload_id.to_s)
|
40
|
+
|
41
|
+
# query parameters
|
42
|
+
query_params = {}
|
43
|
+
|
44
|
+
# header parameters
|
45
|
+
header_params = {}
|
46
|
+
# HTTP header 'Accept' (if needed)
|
47
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
48
|
+
|
49
|
+
# form parameters
|
50
|
+
form_params = {}
|
51
|
+
|
52
|
+
# http body (model)
|
53
|
+
post_body = nil
|
54
|
+
auth_names = ['accessToken']
|
55
|
+
data, status_code, headers = @api_client.call_api(:PUT, 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 => 'UploadResponse')
|
62
|
+
if @api_client.config.debugging
|
63
|
+
@api_client.config.logger.debug "API called: DirectUploadsApi#cancel_direct_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
64
|
+
end
|
65
|
+
return data, status_code, headers
|
66
|
+
end
|
67
|
+
|
68
|
+
# Create a new direct upload URL
|
69
|
+
# @param create_upload_request
|
70
|
+
# @param [Hash] opts the optional parameters
|
71
|
+
# @return [UploadResponse]
|
72
|
+
def create_direct_upload(create_upload_request, opts = {})
|
73
|
+
data, _status_code, _headers = create_direct_upload_with_http_info(create_upload_request, opts)
|
74
|
+
data
|
75
|
+
end
|
76
|
+
|
77
|
+
# Create a new direct upload URL
|
78
|
+
# @param create_upload_request
|
79
|
+
# @param [Hash] opts the optional parameters
|
80
|
+
# @return [Array<(UploadResponse, Fixnum, Hash)>] UploadResponse data, response status code and response headers
|
81
|
+
def create_direct_upload_with_http_info(create_upload_request, opts = {})
|
82
|
+
if @api_client.config.debugging
|
83
|
+
@api_client.config.logger.debug 'Calling API: DirectUploadsApi.create_direct_upload ...'
|
84
|
+
end
|
85
|
+
# verify the required parameter 'create_upload_request' is set
|
86
|
+
if @api_client.config.client_side_validation && create_upload_request.nil?
|
87
|
+
fail ArgumentError, "Missing the required parameter 'create_upload_request' when calling DirectUploadsApi.create_direct_upload"
|
88
|
+
end
|
89
|
+
# resource path
|
90
|
+
local_var_path = '/video/v1/uploads'
|
91
|
+
|
92
|
+
# query parameters
|
93
|
+
query_params = {}
|
94
|
+
|
95
|
+
# header parameters
|
96
|
+
header_params = {}
|
97
|
+
# HTTP header 'Accept' (if needed)
|
98
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
99
|
+
# HTTP header 'Content-Type'
|
100
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
101
|
+
|
102
|
+
# form parameters
|
103
|
+
form_params = {}
|
104
|
+
|
105
|
+
# http body (model)
|
106
|
+
post_body = @api_client.object_to_http_body(create_upload_request)
|
107
|
+
auth_names = ['accessToken']
|
108
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
109
|
+
:header_params => header_params,
|
110
|
+
:query_params => query_params,
|
111
|
+
:form_params => form_params,
|
112
|
+
:body => post_body,
|
113
|
+
:auth_names => auth_names,
|
114
|
+
:return_type => 'UploadResponse')
|
115
|
+
if @api_client.config.debugging
|
116
|
+
@api_client.config.logger.debug "API called: DirectUploadsApi#create_direct_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
117
|
+
end
|
118
|
+
return data, status_code, headers
|
119
|
+
end
|
120
|
+
|
121
|
+
# Retrieve a single direct upload's info
|
122
|
+
# @param upload_id ID of the Upload
|
123
|
+
# @param [Hash] opts the optional parameters
|
124
|
+
# @return [UploadResponse]
|
125
|
+
def get_direct_upload(upload_id, opts = {})
|
126
|
+
data, _status_code, _headers = get_direct_upload_with_http_info(upload_id, opts)
|
127
|
+
data
|
128
|
+
end
|
129
|
+
|
130
|
+
# Retrieve a single direct upload's info
|
131
|
+
# @param upload_id ID of the Upload
|
132
|
+
# @param [Hash] opts the optional parameters
|
133
|
+
# @return [Array<(UploadResponse, Fixnum, Hash)>] UploadResponse data, response status code and response headers
|
134
|
+
def get_direct_upload_with_http_info(upload_id, opts = {})
|
135
|
+
if @api_client.config.debugging
|
136
|
+
@api_client.config.logger.debug 'Calling API: DirectUploadsApi.get_direct_upload ...'
|
137
|
+
end
|
138
|
+
# verify the required parameter 'upload_id' is set
|
139
|
+
if @api_client.config.client_side_validation && upload_id.nil?
|
140
|
+
fail ArgumentError, "Missing the required parameter 'upload_id' when calling DirectUploadsApi.get_direct_upload"
|
141
|
+
end
|
142
|
+
# resource path
|
143
|
+
local_var_path = '/video/v1/uploads/{UPLOAD_ID}'.sub('{' + 'UPLOAD_ID' + '}', upload_id.to_s)
|
144
|
+
|
145
|
+
# query parameters
|
146
|
+
query_params = {}
|
147
|
+
|
148
|
+
# header parameters
|
149
|
+
header_params = {}
|
150
|
+
# HTTP header 'Accept' (if needed)
|
151
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
152
|
+
|
153
|
+
# form parameters
|
154
|
+
form_params = {}
|
155
|
+
|
156
|
+
# http body (model)
|
157
|
+
post_body = nil
|
158
|
+
auth_names = ['accessToken']
|
159
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
160
|
+
:header_params => header_params,
|
161
|
+
:query_params => query_params,
|
162
|
+
:form_params => form_params,
|
163
|
+
:body => post_body,
|
164
|
+
:auth_names => auth_names,
|
165
|
+
:return_type => 'UploadResponse')
|
166
|
+
if @api_client.config.debugging
|
167
|
+
@api_client.config.logger.debug "API called: DirectUploadsApi#get_direct_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
168
|
+
end
|
169
|
+
return data, status_code, headers
|
170
|
+
end
|
171
|
+
|
172
|
+
# List direct uploads
|
173
|
+
# @param [Hash] opts the optional parameters
|
174
|
+
# @option opts [Integer] :limit Number of items to include in the response (default to 25)
|
175
|
+
# @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1)
|
176
|
+
# @return [ListUploadsResponse]
|
177
|
+
def list_direct_uploads(opts = {})
|
178
|
+
data, _status_code, _headers = list_direct_uploads_with_http_info(opts)
|
179
|
+
data
|
180
|
+
end
|
181
|
+
|
182
|
+
# List direct uploads
|
183
|
+
# @param [Hash] opts the optional parameters
|
184
|
+
# @option opts [Integer] :limit Number of items to include in the response
|
185
|
+
# @option opts [Integer] :page Offset by this many pages, of the size of `limit`
|
186
|
+
# @return [Array<(ListUploadsResponse, Fixnum, Hash)>] ListUploadsResponse data, response status code and response headers
|
187
|
+
def list_direct_uploads_with_http_info(opts = {})
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug 'Calling API: DirectUploadsApi.list_direct_uploads ...'
|
190
|
+
end
|
191
|
+
# resource path
|
192
|
+
local_var_path = '/video/v1/uploads'
|
193
|
+
|
194
|
+
# query parameters
|
195
|
+
query_params = {}
|
196
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
197
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
198
|
+
|
199
|
+
# header parameters
|
200
|
+
header_params = {}
|
201
|
+
# HTTP header 'Accept' (if needed)
|
202
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
203
|
+
|
204
|
+
# form parameters
|
205
|
+
form_params = {}
|
206
|
+
|
207
|
+
# http body (model)
|
208
|
+
post_body = nil
|
209
|
+
auth_names = ['accessToken']
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
211
|
+
:header_params => header_params,
|
212
|
+
:query_params => query_params,
|
213
|
+
:form_params => form_params,
|
214
|
+
:body => post_body,
|
215
|
+
:auth_names => auth_names,
|
216
|
+
:return_type => 'ListUploadsResponse')
|
217
|
+
if @api_client.config.debugging
|
218
|
+
@api_client.config.logger.debug "API called: DirectUploadsApi#list_direct_uploads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
219
|
+
end
|
220
|
+
return data, status_code, headers
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
end
|
@@ -0,0 +1,69 @@
|
|
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 ErrorsApi
|
10
|
+
attr_accessor :api_client
|
11
|
+
|
12
|
+
def initialize(api_client = ApiClient.default)
|
13
|
+
@api_client = api_client
|
14
|
+
end
|
15
|
+
# List Errors
|
16
|
+
# Returns a list of errors
|
17
|
+
# @param [Hash] opts the optional parameters
|
18
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
19
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
20
|
+
# @return [ListErrorsResponse]
|
21
|
+
def list_errors(opts = {})
|
22
|
+
data, _status_code, _headers = list_errors_with_http_info(opts)
|
23
|
+
data
|
24
|
+
end
|
25
|
+
|
26
|
+
# List Errors
|
27
|
+
# Returns a list of errors
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
30
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
31
|
+
# @return [Array<(ListErrorsResponse, Fixnum, Hash)>] ListErrorsResponse data, response status code and response headers
|
32
|
+
def list_errors_with_http_info(opts = {})
|
33
|
+
if @api_client.config.debugging
|
34
|
+
@api_client.config.logger.debug 'Calling API: ErrorsApi.list_errors ...'
|
35
|
+
end
|
36
|
+
# resource path
|
37
|
+
local_var_path = '/data/v1/errors'
|
38
|
+
|
39
|
+
# query parameters
|
40
|
+
query_params = {}
|
41
|
+
query_params[:'filters[]'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
|
42
|
+
query_params[:'timeframe[]'] = @api_client.build_collection_param(opts[:'timeframe'], :multi) if !opts[:'timeframe'].nil?
|
43
|
+
|
44
|
+
# header parameters
|
45
|
+
header_params = {}
|
46
|
+
# HTTP header 'Accept' (if needed)
|
47
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
48
|
+
|
49
|
+
# form parameters
|
50
|
+
form_params = {}
|
51
|
+
|
52
|
+
# http body (model)
|
53
|
+
post_body = nil
|
54
|
+
auth_names = ['accessToken']
|
55
|
+
data, status_code, headers = @api_client.call_api(:GET, 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 => 'ListErrorsResponse')
|
62
|
+
if @api_client.config.debugging
|
63
|
+
@api_client.config.logger.debug "API called: ErrorsApi#list_errors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
64
|
+
end
|
65
|
+
return data, status_code, headers
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,63 @@
|
|
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 ExportsApi
|
10
|
+
attr_accessor :api_client
|
11
|
+
|
12
|
+
def initialize(api_client = ApiClient.default)
|
13
|
+
@api_client = api_client
|
14
|
+
end
|
15
|
+
# List property video view export links
|
16
|
+
# Lists the available video view exports along with URLs to retrieve them
|
17
|
+
# @param [Hash] opts the optional parameters
|
18
|
+
# @return [ListExportsResponse]
|
19
|
+
def list_exports(opts = {})
|
20
|
+
data, _status_code, _headers = list_exports_with_http_info(opts)
|
21
|
+
data
|
22
|
+
end
|
23
|
+
|
24
|
+
# List property video view export links
|
25
|
+
# Lists the available video view exports along with URLs to retrieve them
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [Array<(ListExportsResponse, Fixnum, Hash)>] ListExportsResponse data, response status code and response headers
|
28
|
+
def list_exports_with_http_info(opts = {})
|
29
|
+
if @api_client.config.debugging
|
30
|
+
@api_client.config.logger.debug 'Calling API: ExportsApi.list_exports ...'
|
31
|
+
end
|
32
|
+
# resource path
|
33
|
+
local_var_path = '/data/v1/exports'
|
34
|
+
|
35
|
+
# query parameters
|
36
|
+
query_params = {}
|
37
|
+
|
38
|
+
# header parameters
|
39
|
+
header_params = {}
|
40
|
+
# HTTP header 'Accept' (if needed)
|
41
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
42
|
+
|
43
|
+
# form parameters
|
44
|
+
form_params = {}
|
45
|
+
|
46
|
+
# http body (model)
|
47
|
+
post_body = nil
|
48
|
+
auth_names = ['accessToken']
|
49
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
50
|
+
:header_params => header_params,
|
51
|
+
:query_params => query_params,
|
52
|
+
:form_params => form_params,
|
53
|
+
:body => post_body,
|
54
|
+
:auth_names => auth_names,
|
55
|
+
:return_type => 'ListExportsResponse')
|
56
|
+
if @api_client.config.debugging
|
57
|
+
@api_client.config.logger.debug "API called: ExportsApi#list_exports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
58
|
+
end
|
59
|
+
return data, status_code, headers
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,128 @@
|
|
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 FiltersApi
|
10
|
+
attr_accessor :api_client
|
11
|
+
|
12
|
+
def initialize(api_client = ApiClient.default)
|
13
|
+
@api_client = api_client
|
14
|
+
end
|
15
|
+
# Lists values for a specific filter
|
16
|
+
# Lists the values for a filter along with a total count of related views
|
17
|
+
# @param filter_id ID of the Filter
|
18
|
+
# @param [Hash] opts the optional parameters
|
19
|
+
# @option opts [Integer] :limit Number of items to include in the response (default to 25)
|
20
|
+
# @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1)
|
21
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
22
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
23
|
+
# @return [ListFilterValuesResponse]
|
24
|
+
def list_filter_values(filter_id, opts = {})
|
25
|
+
data, _status_code, _headers = list_filter_values_with_http_info(filter_id, opts)
|
26
|
+
data
|
27
|
+
end
|
28
|
+
|
29
|
+
# Lists values for a specific filter
|
30
|
+
# Lists the values for a filter along with a total count of related views
|
31
|
+
# @param filter_id ID of the Filter
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @option opts [Integer] :limit Number of items to include in the response
|
34
|
+
# @option opts [Integer] :page Offset by this many pages, of the size of `limit`
|
35
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
36
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
37
|
+
# @return [Array<(ListFilterValuesResponse, Fixnum, Hash)>] ListFilterValuesResponse data, response status code and response headers
|
38
|
+
def list_filter_values_with_http_info(filter_id, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug 'Calling API: FiltersApi.list_filter_values ...'
|
41
|
+
end
|
42
|
+
# verify the required parameter 'filter_id' is set
|
43
|
+
if @api_client.config.client_side_validation && filter_id.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'filter_id' when calling FiltersApi.list_filter_values"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = '/data/v1/filters/{FILTER_ID}'.sub('{' + 'FILTER_ID' + '}', filter_id.to_s)
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = {}
|
51
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
52
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
53
|
+
query_params[:'filters[]'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
|
54
|
+
query_params[:'timeframe[]'] = @api_client.build_collection_param(opts[:'timeframe'], :multi) if !opts[:'timeframe'].nil?
|
55
|
+
|
56
|
+
# header parameters
|
57
|
+
header_params = {}
|
58
|
+
# HTTP header 'Accept' (if needed)
|
59
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = nil
|
66
|
+
auth_names = ['accessToken']
|
67
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
68
|
+
:header_params => header_params,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body,
|
72
|
+
:auth_names => auth_names,
|
73
|
+
:return_type => 'ListFilterValuesResponse')
|
74
|
+
if @api_client.config.debugging
|
75
|
+
@api_client.config.logger.debug "API called: FiltersApi#list_filter_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
76
|
+
end
|
77
|
+
return data, status_code, headers
|
78
|
+
end
|
79
|
+
|
80
|
+
# List Filters
|
81
|
+
# Lists all the filters broken out into basic and advanced
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @return [ListFiltersResponse]
|
84
|
+
def list_filters(opts = {})
|
85
|
+
data, _status_code, _headers = list_filters_with_http_info(opts)
|
86
|
+
data
|
87
|
+
end
|
88
|
+
|
89
|
+
# List Filters
|
90
|
+
# Lists all the filters broken out into basic and advanced
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(ListFiltersResponse, Fixnum, Hash)>] ListFiltersResponse data, response status code and response headers
|
93
|
+
def list_filters_with_http_info(opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug 'Calling API: FiltersApi.list_filters ...'
|
96
|
+
end
|
97
|
+
# resource path
|
98
|
+
local_var_path = '/data/v1/filters'
|
99
|
+
|
100
|
+
# query parameters
|
101
|
+
query_params = {}
|
102
|
+
|
103
|
+
# header parameters
|
104
|
+
header_params = {}
|
105
|
+
# HTTP header 'Accept' (if needed)
|
106
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
107
|
+
|
108
|
+
# form parameters
|
109
|
+
form_params = {}
|
110
|
+
|
111
|
+
# http body (model)
|
112
|
+
post_body = nil
|
113
|
+
auth_names = ['accessToken']
|
114
|
+
data, status_code, headers = @api_client.call_api(:GET, 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 => 'ListFiltersResponse')
|
121
|
+
if @api_client.config.debugging
|
122
|
+
@api_client.config.logger.debug "API called: FiltersApi#list_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
123
|
+
end
|
124
|
+
return data, status_code, headers
|
125
|
+
end
|
126
|
+
|
127
|
+
end
|
128
|
+
end
|