mux_ruby 3.0.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +4 -4
  4. data/docs/Asset.md +1 -1
  5. data/docs/AssetsApi.md +73 -0
  6. data/docs/CreateAssetRequest.md +1 -1
  7. data/docs/CreateLiveStreamRequest.md +4 -2
  8. data/docs/CreatePlaybackRestrictionRequest.md +18 -0
  9. data/docs/CreateSimulcastTargetRequest.md +1 -1
  10. data/docs/CreateTrackRequest.md +1 -1
  11. data/docs/DeliveryUsageApi.md +4 -2
  12. data/docs/DimensionsApi.md +4 -4
  13. data/docs/ErrorsApi.md +4 -4
  14. data/docs/FiltersApi.md +4 -4
  15. data/docs/InputSettings.md +1 -1
  16. data/docs/ListPlaybackRestrictionsResponse.md +18 -0
  17. data/docs/LiveStream.md +8 -4
  18. data/docs/LiveStreamEmbeddedSubtitleSettings.md +1 -1
  19. data/docs/LiveStreamStatus.md +15 -0
  20. data/docs/LiveStreamsApi.md +76 -1
  21. data/docs/MetricsApi.md +21 -21
  22. data/docs/PlaybackRestriction.md +24 -0
  23. data/docs/PlaybackRestrictionResponse.md +18 -0
  24. data/docs/PlaybackRestrictionsApi.md +367 -0
  25. data/docs/RealTimeApi.md +6 -6
  26. data/docs/ReferrerDomainRestriction.md +20 -0
  27. data/docs/SimulcastTarget.md +1 -1
  28. data/docs/Track.md +1 -1
  29. data/docs/UpdateAssetRequest.md +18 -0
  30. data/docs/UpdateLiveStreamRequest.md +22 -0
  31. data/docs/UpdateReferrerDomainRestrictionRequest.md +15 -0
  32. data/docs/VideoViewsApi.md +4 -4
  33. data/examples/data/exercise-errors.rb +0 -1
  34. data/gen/generator-config.json +1 -1
  35. data/lib/mux_ruby/api/assets_api.rb +71 -0
  36. data/lib/mux_ruby/api/delivery_usage_api.rb +5 -2
  37. data/lib/mux_ruby/api/dimensions_api.rb +4 -4
  38. data/lib/mux_ruby/api/errors_api.rb +4 -4
  39. data/lib/mux_ruby/api/filters_api.rb +4 -4
  40. data/lib/mux_ruby/api/live_streams_api.rb +74 -0
  41. data/lib/mux_ruby/api/metrics_api.rb +22 -22
  42. data/lib/mux_ruby/api/playback_restrictions_api.rb +345 -0
  43. data/lib/mux_ruby/api/real_time_api.rb +6 -6
  44. data/lib/mux_ruby/api/video_views_api.rb +4 -4
  45. data/lib/mux_ruby/models/asset.rb +1 -1
  46. data/lib/mux_ruby/models/create_asset_request.rb +1 -1
  47. data/lib/mux_ruby/models/create_live_stream_request.rb +47 -3
  48. data/lib/mux_ruby/models/create_playback_restriction_request.rb +218 -0
  49. data/lib/mux_ruby/models/create_simulcast_target_request.rb +1 -1
  50. data/lib/mux_ruby/models/create_track_request.rb +1 -1
  51. data/lib/mux_ruby/models/input_settings.rb +1 -1
  52. data/lib/mux_ruby/models/input_settings_overlay_settings.rb +1 -1
  53. data/lib/mux_ruby/models/list_playback_restrictions_response.rb +220 -0
  54. data/lib/mux_ruby/models/live_stream.rb +35 -14
  55. data/lib/mux_ruby/models/live_stream_embedded_subtitle_settings.rb +1 -1
  56. data/lib/mux_ruby/models/live_stream_status.rb +38 -0
  57. data/lib/mux_ruby/models/playback_restriction.rb +248 -0
  58. data/lib/mux_ruby/models/playback_restriction_response.rb +218 -0
  59. data/lib/mux_ruby/models/referrer_domain_restriction.rb +234 -0
  60. data/lib/mux_ruby/models/simulcast_target.rb +1 -1
  61. data/lib/mux_ruby/models/track.rb +1 -1
  62. data/lib/mux_ruby/models/update_asset_request.rb +219 -0
  63. data/lib/mux_ruby/models/update_live_stream_request.rb +297 -0
  64. data/lib/mux_ruby/models/update_referrer_domain_restriction_request.rb +209 -0
  65. data/lib/mux_ruby/version.rb +1 -1
  66. data/lib/mux_ruby.rb +10 -0
  67. data/spec/api/playback_restrictions_api_spec.rb +97 -0
  68. data/spec/models/create_playback_restriction_request_spec.rb +34 -0
  69. data/spec/models/list_playback_restrictions_response_spec.rb +34 -0
  70. data/spec/models/live_stream_status_spec.rb +28 -0
  71. data/spec/models/playback_restriction_response_spec.rb +28 -0
  72. data/spec/models/playback_restriction_spec.rb +52 -0
  73. data/spec/models/referrer_domain_restriction_spec.rb +40 -0
  74. data/spec/models/update_asset_request_spec.rb +34 -0
  75. data/spec/models/update_live_stream_request_spec.rb +50 -0
  76. data/spec/models/update_referrer_domain_restriction_request_spec.rb +28 -0
  77. metadata +135 -95
@@ -0,0 +1,345 @@
1
+ =begin
2
+ #Mux API
3
+
4
+ #Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: devex@mux.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module MuxRuby
16
+ class PlaybackRestrictionsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a Playback Restriction
23
+ # Create a new Playback Restriction.
24
+ # @param create_playback_restriction_request [CreatePlaybackRestrictionRequest]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [PlaybackRestrictionResponse]
27
+ def create_playback_restriction(create_playback_restriction_request, opts = {})
28
+ data, _status_code, _headers = create_playback_restriction_with_http_info(create_playback_restriction_request, opts)
29
+ data
30
+ end
31
+
32
+ # Create a Playback Restriction
33
+ # Create a new Playback Restriction.
34
+ # @param create_playback_restriction_request [CreatePlaybackRestrictionRequest]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(PlaybackRestrictionResponse, Integer, Hash)>] PlaybackRestrictionResponse data, response status code and response headers
37
+ def create_playback_restriction_with_http_info(create_playback_restriction_request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: PlaybackRestrictionsApi.create_playback_restriction ...'
40
+ end
41
+ # verify the required parameter 'create_playback_restriction_request' is set
42
+ if @api_client.config.client_side_validation && create_playback_restriction_request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'create_playback_restriction_request' when calling PlaybackRestrictionsApi.create_playback_restriction"
44
+ end
45
+ # resource path
46
+ local_var_path = '/video/v1/playback-restrictions'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_playback_restriction_request)
63
+
64
+ # return_type
65
+ return_type = opts[:debug_return_type] || 'PlaybackRestrictionResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:debug_auth_names] || ['accessToken']
69
+
70
+ new_options = opts.merge(
71
+ :operation => :"PlaybackRestrictionsApi.create_playback_restriction",
72
+ :header_params => header_params,
73
+ :query_params => query_params,
74
+ :form_params => form_params,
75
+ :body => post_body,
76
+ :auth_names => auth_names,
77
+ :return_type => return_type
78
+ )
79
+
80
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: PlaybackRestrictionsApi#create_playback_restriction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ return data, status_code, headers
85
+ end
86
+
87
+ # Delete a Playback Restriction
88
+ # Deletes a single Playback Restriction.
89
+ # @param playback_restriction_id [String] ID of the Playback Restriction.
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [nil]
92
+ def delete_playback_restriction(playback_restriction_id, opts = {})
93
+ delete_playback_restriction_with_http_info(playback_restriction_id, opts)
94
+ nil
95
+ end
96
+
97
+ # Delete a Playback Restriction
98
+ # Deletes a single Playback Restriction.
99
+ # @param playback_restriction_id [String] ID of the Playback Restriction.
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
102
+ def delete_playback_restriction_with_http_info(playback_restriction_id, opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug 'Calling API: PlaybackRestrictionsApi.delete_playback_restriction ...'
105
+ end
106
+ # verify the required parameter 'playback_restriction_id' is set
107
+ if @api_client.config.client_side_validation && playback_restriction_id.nil?
108
+ fail ArgumentError, "Missing the required parameter 'playback_restriction_id' when calling PlaybackRestrictionsApi.delete_playback_restriction"
109
+ end
110
+ # resource path
111
+ local_var_path = '/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}'.sub('{' + 'PLAYBACK_RESTRICTION_ID' + '}', CGI.escape(playback_restriction_id.to_s))
112
+
113
+ # query parameters
114
+ query_params = opts[:query_params] || {}
115
+
116
+ # header parameters
117
+ header_params = opts[:header_params] || {}
118
+
119
+ # form parameters
120
+ form_params = opts[:form_params] || {}
121
+
122
+ # http body (model)
123
+ post_body = opts[:debug_body]
124
+
125
+ # return_type
126
+ return_type = opts[:debug_return_type]
127
+
128
+ # auth_names
129
+ auth_names = opts[:debug_auth_names] || ['accessToken']
130
+
131
+ new_options = opts.merge(
132
+ :operation => :"PlaybackRestrictionsApi.delete_playback_restriction",
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: PlaybackRestrictionsApi#delete_playback_restriction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Retrieve a Playback Restriction
149
+ # Retrieves a Playback Restriction associated with the unique identifier.
150
+ # @param playback_restriction_id [String] ID of the Playback Restriction.
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [PlaybackRestrictionResponse]
153
+ def get_playback_restriction(playback_restriction_id, opts = {})
154
+ data, _status_code, _headers = get_playback_restriction_with_http_info(playback_restriction_id, opts)
155
+ data
156
+ end
157
+
158
+ # Retrieve a Playback Restriction
159
+ # Retrieves a Playback Restriction associated with the unique identifier.
160
+ # @param playback_restriction_id [String] ID of the Playback Restriction.
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(PlaybackRestrictionResponse, Integer, Hash)>] PlaybackRestrictionResponse data, response status code and response headers
163
+ def get_playback_restriction_with_http_info(playback_restriction_id, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: PlaybackRestrictionsApi.get_playback_restriction ...'
166
+ end
167
+ # verify the required parameter 'playback_restriction_id' is set
168
+ if @api_client.config.client_side_validation && playback_restriction_id.nil?
169
+ fail ArgumentError, "Missing the required parameter 'playback_restriction_id' when calling PlaybackRestrictionsApi.get_playback_restriction"
170
+ end
171
+ # resource path
172
+ local_var_path = '/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}'.sub('{' + 'PLAYBACK_RESTRICTION_ID' + '}', CGI.escape(playback_restriction_id.to_s))
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+
177
+ # header parameters
178
+ header_params = opts[:header_params] || {}
179
+ # HTTP header 'Accept' (if needed)
180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
181
+
182
+ # form parameters
183
+ form_params = opts[:form_params] || {}
184
+
185
+ # http body (model)
186
+ post_body = opts[:debug_body]
187
+
188
+ # return_type
189
+ return_type = opts[:debug_return_type] || 'PlaybackRestrictionResponse'
190
+
191
+ # auth_names
192
+ auth_names = opts[:debug_auth_names] || ['accessToken']
193
+
194
+ new_options = opts.merge(
195
+ :operation => :"PlaybackRestrictionsApi.get_playback_restriction",
196
+ :header_params => header_params,
197
+ :query_params => query_params,
198
+ :form_params => form_params,
199
+ :body => post_body,
200
+ :auth_names => auth_names,
201
+ :return_type => return_type
202
+ )
203
+
204
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
205
+ if @api_client.config.debugging
206
+ @api_client.config.logger.debug "API called: PlaybackRestrictionsApi#get_playback_restriction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
207
+ end
208
+ return data, status_code, headers
209
+ end
210
+
211
+ # List Playback Restrictions
212
+ # Returns a list of all Playback Restrictions.
213
+ # @param [Hash] opts the optional parameters
214
+ # @option opts [Integer] :page Offset by this many pages, of the size of &#x60;limit&#x60; (default to 1)
215
+ # @option opts [Integer] :limit Number of items to include in the response (default to 25)
216
+ # @return [ListPlaybackRestrictionsResponse]
217
+ def list_playback_restrictions(opts = {})
218
+ data, _status_code, _headers = list_playback_restrictions_with_http_info(opts)
219
+ data
220
+ end
221
+
222
+ # List Playback Restrictions
223
+ # Returns a list of all Playback Restrictions.
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [Integer] :page Offset by this many pages, of the size of &#x60;limit&#x60;
226
+ # @option opts [Integer] :limit Number of items to include in the response
227
+ # @return [Array<(ListPlaybackRestrictionsResponse, Integer, Hash)>] ListPlaybackRestrictionsResponse data, response status code and response headers
228
+ def list_playback_restrictions_with_http_info(opts = {})
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug 'Calling API: PlaybackRestrictionsApi.list_playback_restrictions ...'
231
+ end
232
+ # resource path
233
+ local_var_path = '/video/v1/playback-restrictions'
234
+
235
+ # query parameters
236
+ query_params = opts[:query_params] || {}
237
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
238
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
239
+
240
+ # header parameters
241
+ header_params = opts[:header_params] || {}
242
+ # HTTP header 'Accept' (if needed)
243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
244
+
245
+ # form parameters
246
+ form_params = opts[:form_params] || {}
247
+
248
+ # http body (model)
249
+ post_body = opts[:debug_body]
250
+
251
+ # return_type
252
+ return_type = opts[:debug_return_type] || 'ListPlaybackRestrictionsResponse'
253
+
254
+ # auth_names
255
+ auth_names = opts[:debug_auth_names] || ['accessToken']
256
+
257
+ new_options = opts.merge(
258
+ :operation => :"PlaybackRestrictionsApi.list_playback_restrictions",
259
+ :header_params => header_params,
260
+ :query_params => query_params,
261
+ :form_params => form_params,
262
+ :body => post_body,
263
+ :auth_names => auth_names,
264
+ :return_type => return_type
265
+ )
266
+
267
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
268
+ if @api_client.config.debugging
269
+ @api_client.config.logger.debug "API called: PlaybackRestrictionsApi#list_playback_restrictions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
+ end
271
+ return data, status_code, headers
272
+ end
273
+
274
+ # Update the Referrer Playback Restriction
275
+ # Allows you to modify the list of domains or change how Mux validates playback requests without the `Referer` HTTP header. The Referrer restriction fully replaces the old list with this new list of domains.
276
+ # @param playback_restriction_id [String] ID of the Playback Restriction.
277
+ # @param body [ReferrerDomainRestriction]
278
+ # @param [Hash] opts the optional parameters
279
+ # @return [PlaybackRestrictionResponse]
280
+ def update_referrer_domain_restriction(playback_restriction_id, body, opts = {})
281
+ data, _status_code, _headers = update_referrer_domain_restriction_with_http_info(playback_restriction_id, body, opts)
282
+ data
283
+ end
284
+
285
+ # Update the Referrer Playback Restriction
286
+ # Allows you to modify the list of domains or change how Mux validates playback requests without the &#x60;Referer&#x60; HTTP header. The Referrer restriction fully replaces the old list with this new list of domains.
287
+ # @param playback_restriction_id [String] ID of the Playback Restriction.
288
+ # @param body [ReferrerDomainRestriction]
289
+ # @param [Hash] opts the optional parameters
290
+ # @return [Array<(PlaybackRestrictionResponse, Integer, Hash)>] PlaybackRestrictionResponse data, response status code and response headers
291
+ def update_referrer_domain_restriction_with_http_info(playback_restriction_id, body, opts = {})
292
+ if @api_client.config.debugging
293
+ @api_client.config.logger.debug 'Calling API: PlaybackRestrictionsApi.update_referrer_domain_restriction ...'
294
+ end
295
+ # verify the required parameter 'playback_restriction_id' is set
296
+ if @api_client.config.client_side_validation && playback_restriction_id.nil?
297
+ fail ArgumentError, "Missing the required parameter 'playback_restriction_id' when calling PlaybackRestrictionsApi.update_referrer_domain_restriction"
298
+ end
299
+ # verify the required parameter 'body' is set
300
+ if @api_client.config.client_side_validation && body.nil?
301
+ fail ArgumentError, "Missing the required parameter 'body' when calling PlaybackRestrictionsApi.update_referrer_domain_restriction"
302
+ end
303
+ # resource path
304
+ local_var_path = '/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/referrer'.sub('{' + 'PLAYBACK_RESTRICTION_ID' + '}', CGI.escape(playback_restriction_id.to_s))
305
+
306
+ # query parameters
307
+ query_params = opts[:query_params] || {}
308
+
309
+ # header parameters
310
+ header_params = opts[:header_params] || {}
311
+ # HTTP header 'Accept' (if needed)
312
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
313
+ # HTTP header 'Content-Type'
314
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
315
+
316
+ # form parameters
317
+ form_params = opts[:form_params] || {}
318
+
319
+ # http body (model)
320
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
321
+
322
+ # return_type
323
+ return_type = opts[:debug_return_type] || 'PlaybackRestrictionResponse'
324
+
325
+ # auth_names
326
+ auth_names = opts[:debug_auth_names] || ['accessToken']
327
+
328
+ new_options = opts.merge(
329
+ :operation => :"PlaybackRestrictionsApi.update_referrer_domain_restriction",
330
+ :header_params => header_params,
331
+ :query_params => query_params,
332
+ :form_params => form_params,
333
+ :body => post_body,
334
+ :auth_names => auth_names,
335
+ :return_type => return_type
336
+ )
337
+
338
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
339
+ if @api_client.config.debugging
340
+ @api_client.config.logger.debug "API called: PlaybackRestrictionsApi#update_referrer_domain_restriction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
341
+ end
342
+ return data, status_code, headers
343
+ end
344
+ end
345
+ end
@@ -25,7 +25,7 @@ module MuxRuby
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [String] :dimension Dimension the specified value belongs to
27
27
  # @option opts [Float] :timestamp Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp.
28
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
28
+ # @option opts [Array<String>] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a &#x60;!&#x60; character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * &#x60;filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;!country:US&#x60;
29
29
  # @option opts [String] :order_by Value to order the results by
30
30
  # @option opts [String] :order_direction Sort order.
31
31
  # @return [GetRealTimeBreakdownResponse]
@@ -40,7 +40,7 @@ module MuxRuby
40
40
  # @param [Hash] opts the optional parameters
41
41
  # @option opts [String] :dimension Dimension the specified value belongs to
42
42
  # @option opts [Float] :timestamp Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp.
43
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
43
+ # @option opts [Array<String>] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a &#x60;!&#x60; character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * &#x60;filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;!country:US&#x60;
44
44
  # @option opts [String] :order_by Value to order the results by
45
45
  # @option opts [String] :order_direction Sort order.
46
46
  # @return [Array<(GetRealTimeBreakdownResponse, Integer, Hash)>] GetRealTimeBreakdownResponse data, response status code and response headers
@@ -118,7 +118,7 @@ module MuxRuby
118
118
  # Gets histogram timeseries information for a specific metric.
119
119
  # @param realtime_histogram_metric_id [String] ID of the Realtime Histogram Metric
120
120
  # @param [Hash] opts the optional parameters
121
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
121
+ # @option opts [Array<String>] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a &#x60;!&#x60; character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * &#x60;filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;!country:US&#x60;
122
122
  # @return [GetRealTimeHistogramTimeseriesResponse]
123
123
  def get_realtime_histogram_timeseries(realtime_histogram_metric_id, opts = {})
124
124
  data, _status_code, _headers = get_realtime_histogram_timeseries_with_http_info(realtime_histogram_metric_id, opts)
@@ -129,7 +129,7 @@ module MuxRuby
129
129
  # Gets histogram timeseries information for a specific metric.
130
130
  # @param realtime_histogram_metric_id [String] ID of the Realtime Histogram Metric
131
131
  # @param [Hash] opts the optional parameters
132
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
132
+ # @option opts [Array<String>] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a &#x60;!&#x60; character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * &#x60;filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;!country:US&#x60;
133
133
  # @return [Array<(GetRealTimeHistogramTimeseriesResponse, Integer, Hash)>] GetRealTimeHistogramTimeseriesResponse data, response status code and response headers
134
134
  def get_realtime_histogram_timeseries_with_http_info(realtime_histogram_metric_id, opts = {})
135
135
  if @api_client.config.debugging
@@ -189,7 +189,7 @@ module MuxRuby
189
189
  # Gets Time series information for a specific metric along with the number of concurrent viewers.
190
190
  # @param realtime_metric_id [String] ID of the Realtime Metric
191
191
  # @param [Hash] opts the optional parameters
192
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
192
+ # @option opts [Array<String>] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a &#x60;!&#x60; character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * &#x60;filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;!country:US&#x60;
193
193
  # @return [GetRealTimeTimeseriesResponse]
194
194
  def get_realtime_timeseries(realtime_metric_id, opts = {})
195
195
  data, _status_code, _headers = get_realtime_timeseries_with_http_info(realtime_metric_id, opts)
@@ -200,7 +200,7 @@ module MuxRuby
200
200
  # Gets Time series information for a specific metric along with the number of concurrent viewers.
201
201
  # @param realtime_metric_id [String] ID of the Realtime Metric
202
202
  # @param [Hash] opts the optional parameters
203
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
203
+ # @option opts [Array<String>] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a &#x60;!&#x60; character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * &#x60;filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;!country:US&#x60;
204
204
  # @return [Array<(GetRealTimeTimeseriesResponse, Integer, Hash)>] GetRealTimeTimeseriesResponse data, response status code and response headers
205
205
  def get_realtime_timeseries_with_http_info(realtime_metric_id, opts = {})
206
206
  if @api_client.config.debugging
@@ -90,8 +90,8 @@ module MuxRuby
90
90
  # @option opts [String] :viewer_id Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux.
91
91
  # @option opts [Integer] :error_id Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error.
92
92
  # @option opts [String] :order_direction Sort order.
93
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
94
- # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
93
+ # @option opts [Array<String>] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a &#x60;!&#x60; character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * &#x60;filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;!country:US&#x60;
94
+ # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. &#x60;timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600&#x60; * duration string e.g. &#x60;timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days&#x60;
95
95
  # @return [ListVideoViewsResponse]
96
96
  def list_video_views(opts = {})
97
97
  data, _status_code, _headers = list_video_views_with_http_info(opts)
@@ -106,8 +106,8 @@ module MuxRuby
106
106
  # @option opts [String] :viewer_id Viewer ID to filter results by. This value may be provided by the integration, or may be created by Mux.
107
107
  # @option opts [Integer] :error_id Filter video views by the provided error ID (as returned in the error_type_id field in the list video views endpoint). If you provide any as the error ID, this will filter the results to those with any error.
108
108
  # @option opts [String] :order_direction Sort order.
109
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
110
- # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
109
+ # @option opts [Array<String>] :filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a &#x60;!&#x60; character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * &#x60;filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;!country:US&#x60;
110
+ # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. &#x60;timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600&#x60; * duration string e.g. &#x60;timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days&#x60;
111
111
  # @return [Array<(ListVideoViewsResponse, Integer, Hash)>] ListVideoViewsResponse data, response status code and response headers
112
112
  def list_video_views_with_http_info(opts = {})
113
113
  if @api_client.config.debugging
@@ -52,7 +52,7 @@ module MuxRuby
52
52
  # Whether the asset is created from a live stream and the live stream is currently `active` and not in `idle` state.
53
53
  attr_accessor :is_live
54
54
 
55
- # Arbitrary metadata set for the asset. Max 255 characters.
55
+ # Arbitrary user-supplied metadata set for the asset. Max 255 characters.
56
56
  attr_accessor :passthrough
57
57
 
58
58
  # Unique identifier for the live stream. This is an optional parameter added when the asset is created from a live stream.
@@ -23,7 +23,7 @@ module MuxRuby
23
23
 
24
24
  attr_accessor :per_title_encode
25
25
 
26
- # Arbitrary metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**.
26
+ # Arbitrary user-supplied metadata that will be included in the asset details and related webhooks. Can be used to store your own ID for a video along with the asset. **Max: 255 characters**.
27
27
  attr_accessor :passthrough
28
28
 
29
29
  # Specify what level (if any) of support for mp4 playback. In most cases you should use our default HLS-based streaming playback ({playback_id}.m3u8) which can automatically adjust to viewers' connection speeds, but an mp4 can be useful for some legacy devices or downloading for offline playback. See the [Download your videos guide](/guides/video/download-your-videos) for more information.
@@ -30,17 +30,42 @@ module MuxRuby
30
30
  # Describe the embedded closed caption contents of the incoming live stream.
31
31
  attr_accessor :embedded_subtitles
32
32
 
33
- # Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/
33
+ # This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/
34
34
  attr_accessor :reduced_latency
35
35
 
36
- # Latency is the time from when the streamer does something in real life to when you see it happen in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds.
36
+ # This field is deprecated. Please use latency_mode instead. Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Setting this option will enable compatibility with the LL-HLS specification for low-latency streaming. This typically has lower latency than Reduced Latency streams, and cannot be combined with Reduced Latency. Note: Reconnect windows are incompatible with Low Latency and will always be set to zero (0) seconds.
37
37
  attr_accessor :low_latency
38
38
 
39
+ # Latency is the time from when the streamer transmits a frame of video to when you see it in the player. Set this as an alternative to setting low latency or reduced latency flags. The Low Latency value is a beta feature. Note: Reconnect windows are incompatible with Reduced Latency and Low Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/introducing-low-latency-live-streaming/
40
+ attr_accessor :latency_mode
41
+
39
42
  # Marks the live stream as a test live stream when the value is set to true. A test live stream can help evaluate the Mux Video APIs without incurring any cost. There is no limit on number of test live streams created. Test live streams are watermarked with the Mux logo and limited to 5 minutes. The test live stream is disabled after the stream is active for 5 mins and the recorded asset also deleted after 24 hours.
40
43
  attr_accessor :test
41
44
 
42
45
  attr_accessor :simulcast_targets
43
46
 
47
+ class EnumAttributeValidator
48
+ attr_reader :datatype
49
+ attr_reader :allowable_values
50
+
51
+ def initialize(datatype, allowable_values)
52
+ @allowable_values = allowable_values.map do |value|
53
+ case datatype.to_s
54
+ when /Integer/i
55
+ value.to_i
56
+ when /Float/i
57
+ value.to_f
58
+ else
59
+ value
60
+ end
61
+ end
62
+ end
63
+
64
+ def valid?(value)
65
+ !value || allowable_values.include?(value)
66
+ end
67
+ end
68
+
44
69
  # Attribute mapping from ruby-style variable name to JSON key.
45
70
  def self.attribute_map
46
71
  {
@@ -52,6 +77,7 @@ module MuxRuby
52
77
  :'embedded_subtitles' => :'embedded_subtitles',
53
78
  :'reduced_latency' => :'reduced_latency',
54
79
  :'low_latency' => :'low_latency',
80
+ :'latency_mode' => :'latency_mode',
55
81
  :'test' => :'test',
56
82
  :'simulcast_targets' => :'simulcast_targets'
57
83
  }
@@ -73,6 +99,7 @@ module MuxRuby
73
99
  :'embedded_subtitles' => :'Array<LiveStreamEmbeddedSubtitleSettings>',
74
100
  :'reduced_latency' => :'Boolean',
75
101
  :'low_latency' => :'Boolean',
102
+ :'latency_mode' => :'String',
76
103
  :'test' => :'Boolean',
77
104
  :'simulcast_targets' => :'Array<CreateSimulcastTargetRequest>'
78
105
  }
@@ -135,6 +162,10 @@ module MuxRuby
135
162
  self.low_latency = attributes[:'low_latency']
136
163
  end
137
164
 
165
+ if attributes.key?(:'latency_mode')
166
+ self.latency_mode = attributes[:'latency_mode']
167
+ end
168
+
138
169
  if attributes.key?(:'test')
139
170
  self.test = attributes[:'test']
140
171
  end
@@ -166,6 +197,8 @@ module MuxRuby
166
197
  def valid?
167
198
  return false if !@reconnect_window.nil? && @reconnect_window > 300
168
199
  return false if !@reconnect_window.nil? && @reconnect_window < 0.1
200
+ latency_mode_validator = EnumAttributeValidator.new('String', ["low", "reduced", "standard"])
201
+ return false unless latency_mode_validator.valid?(@latency_mode)
169
202
  true
170
203
  end
171
204
 
@@ -183,6 +216,16 @@ module MuxRuby
183
216
  @reconnect_window = reconnect_window
184
217
  end
185
218
 
219
+ # Custom attribute writer method checking allowed values (enum).
220
+ # @param [Object] latency_mode Object to be assigned
221
+ def latency_mode=(latency_mode)
222
+ validator = EnumAttributeValidator.new('String', ["low", "reduced", "standard"])
223
+ unless validator.valid?(latency_mode)
224
+ fail ArgumentError, "invalid value for \"latency_mode\", must be one of #{validator.allowable_values}."
225
+ end
226
+ @latency_mode = latency_mode
227
+ end
228
+
186
229
  # Checks equality by comparing each attribute.
187
230
  # @param [Object] Object to be compared
188
231
  def ==(o)
@@ -196,6 +239,7 @@ module MuxRuby
196
239
  embedded_subtitles == o.embedded_subtitles &&
197
240
  reduced_latency == o.reduced_latency &&
198
241
  low_latency == o.low_latency &&
242
+ latency_mode == o.latency_mode &&
199
243
  test == o.test &&
200
244
  simulcast_targets == o.simulcast_targets
201
245
  end
@@ -209,7 +253,7 @@ module MuxRuby
209
253
  # Calculates hash code according to all attributes.
210
254
  # @return [Integer] Hash code
211
255
  def hash
212
- [playback_policy, new_asset_settings, reconnect_window, passthrough, audio_only, embedded_subtitles, reduced_latency, low_latency, test, simulcast_targets].hash
256
+ [playback_policy, new_asset_settings, reconnect_window, passthrough, audio_only, embedded_subtitles, reduced_latency, low_latency, latency_mode, test, simulcast_targets].hash
213
257
  end
214
258
 
215
259
  # Builds the object from hash