mux_ruby 3.3.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 100603ac91cb5212144014d58eb7ef4dc296f26dd3b0bb71b94085011b62048e
4
- data.tar.gz: ad3388876ea716146d7cb99f3633cbfc1d7c9d02acafc1156a899e1b484ece3a
3
+ metadata.gz: cfa2b08545d6b8941ea2e14589be5e5f1caa824b34bbf1aa94cdc0a9ec5ed49f
4
+ data.tar.gz: e4d38cf3dcf1a2e797475414b3d98ad8b30f5c4c9d4b853f51cfed1673f9fb29
5
5
  SHA512:
6
- metadata.gz: 6cfc04a05fae4dce6414074b9c7cf3d380ca125770752a82484fce551c5cfb891d42d76fbc9c18fd5db6d0bf75d0e20ba97f5eb1456c52177f9616ba7836310c
7
- data.tar.gz: 84f958bec106296f151ce7ef7d012276b8824996562399df36f0a1104815010daa3de80acc877785d14abf35c03e24f70dd0bed626ccdcedd0c254fccbd2c2de
6
+ metadata.gz: 443210ca73ae9483681dbaf3f57b184851483a310590c16a8932a0aa16f02e26d64d43e83a4cc3420615202c5fb089961cfce4877e9c67d8f9aab90f1bb844f7
7
+ data.tar.gz: 4cf2ff058d777f4149162e4a023d3c4ad679e02faac52e50ebac69f9c6ab4bff04bfaf5ff7b67f30c073795630cdcc4cde8a28384761fe40317c1d5e4bd0e475
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mux_ruby (3.3.0)
4
+ mux_ruby (3.3.1)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -17,7 +17,7 @@ Not familiar with Mux? Check out https://mux.com/ for more information.
17
17
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
18
18
 
19
19
  - API version: v1
20
- - Package version: 3.3.0
20
+ - Package version: 3.3.1
21
21
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
22
22
  For more information, please visit [https://docs.mux.com](https://docs.mux.com)
23
23
 
@@ -34,16 +34,16 @@ gem build mux_ruby.gemspec
34
34
  Then either install the gem locally:
35
35
 
36
36
  ```shell
37
- gem install ./mux_ruby-3.3.0.gem
37
+ gem install ./mux_ruby-3.3.1.gem
38
38
  ```
39
39
 
40
- (for development, run `gem install --dev ./mux_ruby-3.3.0.gem` to install the development dependencies)
40
+ (for development, run `gem install --dev ./mux_ruby-3.3.1.gem` to install the development dependencies)
41
41
 
42
42
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
43
43
 
44
44
  Finally add this to the Gemfile:
45
45
 
46
- gem 'mux_ruby', '~> 3.3.0'
46
+ gem 'mux_ruby', '~> 3.3.1'
47
47
 
48
48
  ### Install from Git
49
49
 
@@ -0,0 +1,18 @@
1
+ # MuxRuby::ListPlaybackRestrictionsResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Array<PlaybackRestriction>**](PlaybackRestriction.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'mux_ruby'
13
+
14
+ instance = MuxRuby::ListPlaybackRestrictionsResponse.new(
15
+ data: null
16
+ )
17
+ ```
18
+
data/docs/MetricsApi.md CHANGED
@@ -17,7 +17,7 @@ All URIs are relative to *https://api.mux.com*
17
17
 
18
18
  Get metric timeseries data
19
19
 
20
- Returns timeseries data for a specific metric.
20
+ Returns timeseries data for a specific metric. Each interval represented in the data array contains an array with the following values: * the first element is the interval time * the second element is the calculated metric value * the third element is the number of views in the interval that have a valid metric value
21
21
 
22
22
  ### Examples
23
23
 
@@ -38,7 +38,7 @@ opts = {
38
38
  filters: ['inner_example'], # Array<String> | 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 `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US`
39
39
  measurement: '95th', # String | Measurement for the provided metric. If omitted, the default for the metric will be used.
40
40
  order_direction: 'asc', # String | Sort order.
41
- group_by: 'hour' # String | Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is `ten_minutes`. Between 6 hours and 15 hours inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 hours is `day`. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity.
41
+ group_by: 'hour' # String | Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is `ten_minutes`. Between 6 hours and 15 hours inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 hours is `day`. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity.
42
42
  }
43
43
 
44
44
  begin
@@ -77,7 +77,7 @@ end
77
77
  | **filters** | [**Array&lt;String&gt;**](String.md) | 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; | [optional] |
78
78
  | **measurement** | **String** | Measurement for the provided metric. If omitted, the default for the metric will be used. | [optional] |
79
79
  | **order_direction** | **String** | Sort order. | [optional] |
80
- | **group_by** | **String** | Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is &#x60;ten_minutes&#x60;. Between 6 hours and 15 hours inclusive, the default granularity is &#x60;hour&#x60;. The granularity of timeframes that exceed 15 hours is &#x60;day&#x60;. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity. | [optional] |
80
+ | **group_by** | **String** | Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is &#x60;ten_minutes&#x60;. Between 6 hours and 15 hours inclusive, the default granularity is &#x60;hour&#x60;. The granularity of timeframes that exceed 15 hours is &#x60;day&#x60;. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity. | [optional] |
81
81
 
82
82
  ### Return type
83
83
 
@@ -4,12 +4,15 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**PlaybackRestriction**](.md) | | [optional] |
7
8
 
8
9
  ## Example
9
10
 
10
11
  ```ruby
11
12
  require 'mux_ruby'
12
13
 
13
- instance = MuxRuby::PlaybackRestrictionResponse.new()
14
+ instance = MuxRuby::PlaybackRestrictionResponse.new(
15
+ data: null
16
+ )
14
17
  ```
15
18
 
@@ -13,7 +13,7 @@ All URIs are relative to *https://api.mux.com*
13
13
 
14
14
  ## create_playback_restriction
15
15
 
16
- > <PlaybackRestriction> create_playback_restriction(create_playback_restriction_request)
16
+ > <PlaybackRestrictionResponse> create_playback_restriction(create_playback_restriction_request)
17
17
 
18
18
  Create a Playback Restriction
19
19
 
@@ -47,7 +47,7 @@ end
47
47
 
48
48
  This returns an Array which contains the response data, status code and headers.
49
49
 
50
- > <Array(<PlaybackRestriction>, Integer, Hash)> create_playback_restriction_with_http_info(create_playback_restriction_request)
50
+ > <Array(<PlaybackRestrictionResponse>, Integer, Hash)> create_playback_restriction_with_http_info(create_playback_restriction_request)
51
51
 
52
52
  ```ruby
53
53
  begin
@@ -55,7 +55,7 @@ begin
55
55
  data, status_code, headers = api_instance.create_playback_restriction_with_http_info(create_playback_restriction_request)
56
56
  p status_code # => 2xx
57
57
  p headers # => { ... }
58
- p data # => <PlaybackRestriction>
58
+ p data # => <PlaybackRestrictionResponse>
59
59
  rescue MuxRuby::ApiError => e
60
60
  puts "Error when calling PlaybackRestrictionsApi->create_playback_restriction_with_http_info: #{e}"
61
61
  end
@@ -69,7 +69,7 @@ end
69
69
 
70
70
  ### Return type
71
71
 
72
- [**PlaybackRestriction**](PlaybackRestriction.md)
72
+ [**PlaybackRestrictionResponse**](PlaybackRestrictionResponse.md)
73
73
 
74
74
  ### Authorization
75
75
 
@@ -152,7 +152,7 @@ nil (empty response body)
152
152
 
153
153
  ## get_playback_restriction
154
154
 
155
- > <PlaybackRestriction> get_playback_restriction(playback_restriction_id)
155
+ > <PlaybackRestrictionResponse> get_playback_restriction(playback_restriction_id)
156
156
 
157
157
  Retrieve a Playback Restriction
158
158
 
@@ -186,7 +186,7 @@ end
186
186
 
187
187
  This returns an Array which contains the response data, status code and headers.
188
188
 
189
- > <Array(<PlaybackRestriction>, Integer, Hash)> get_playback_restriction_with_http_info(playback_restriction_id)
189
+ > <Array(<PlaybackRestrictionResponse>, Integer, Hash)> get_playback_restriction_with_http_info(playback_restriction_id)
190
190
 
191
191
  ```ruby
192
192
  begin
@@ -194,7 +194,7 @@ begin
194
194
  data, status_code, headers = api_instance.get_playback_restriction_with_http_info(playback_restriction_id)
195
195
  p status_code # => 2xx
196
196
  p headers # => { ... }
197
- p data # => <PlaybackRestriction>
197
+ p data # => <PlaybackRestrictionResponse>
198
198
  rescue MuxRuby::ApiError => e
199
199
  puts "Error when calling PlaybackRestrictionsApi->get_playback_restriction_with_http_info: #{e}"
200
200
  end
@@ -208,7 +208,7 @@ end
208
208
 
209
209
  ### Return type
210
210
 
211
- [**PlaybackRestriction**](PlaybackRestriction.md)
211
+ [**PlaybackRestrictionResponse**](PlaybackRestrictionResponse.md)
212
212
 
213
213
  ### Authorization
214
214
 
@@ -222,7 +222,7 @@ end
222
222
 
223
223
  ## list_playback_restrictions
224
224
 
225
- > <Array<PlaybackRestriction>> list_playback_restrictions(opts)
225
+ > <ListPlaybackRestrictionsResponse> list_playback_restrictions(opts)
226
226
 
227
227
  List Playback Restrictions
228
228
 
@@ -259,7 +259,7 @@ end
259
259
 
260
260
  This returns an Array which contains the response data, status code and headers.
261
261
 
262
- > <Array(<Array<PlaybackRestriction>>, Integer, Hash)> list_playback_restrictions_with_http_info(opts)
262
+ > <Array(<ListPlaybackRestrictionsResponse>, Integer, Hash)> list_playback_restrictions_with_http_info(opts)
263
263
 
264
264
  ```ruby
265
265
  begin
@@ -267,7 +267,7 @@ begin
267
267
  data, status_code, headers = api_instance.list_playback_restrictions_with_http_info(opts)
268
268
  p status_code # => 2xx
269
269
  p headers # => { ... }
270
- p data # => <Array<PlaybackRestriction>>
270
+ p data # => <ListPlaybackRestrictionsResponse>
271
271
  rescue MuxRuby::ApiError => e
272
272
  puts "Error when calling PlaybackRestrictionsApi->list_playback_restrictions_with_http_info: #{e}"
273
273
  end
@@ -282,7 +282,7 @@ end
282
282
 
283
283
  ### Return type
284
284
 
285
- [**Array&lt;PlaybackRestriction&gt;**](PlaybackRestriction.md)
285
+ [**ListPlaybackRestrictionsResponse**](ListPlaybackRestrictionsResponse.md)
286
286
 
287
287
  ### Authorization
288
288
 
@@ -296,11 +296,11 @@ end
296
296
 
297
297
  ## update_referrer_domain_restriction
298
298
 
299
- > <PlaybackRestriction> update_referrer_domain_restriction(playback_restriction_id, body)
299
+ > <PlaybackRestrictionResponse> update_referrer_domain_restriction(playback_restriction_id, body)
300
300
 
301
301
  Update the Referrer Playback Restriction
302
302
 
303
- Allows you to modify the list of domians 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.
303
+ 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.
304
304
 
305
305
  ### Examples
306
306
 
@@ -331,7 +331,7 @@ end
331
331
 
332
332
  This returns an Array which contains the response data, status code and headers.
333
333
 
334
- > <Array(<PlaybackRestriction>, Integer, Hash)> update_referrer_domain_restriction_with_http_info(playback_restriction_id, body)
334
+ > <Array(<PlaybackRestrictionResponse>, Integer, Hash)> update_referrer_domain_restriction_with_http_info(playback_restriction_id, body)
335
335
 
336
336
  ```ruby
337
337
  begin
@@ -339,7 +339,7 @@ begin
339
339
  data, status_code, headers = api_instance.update_referrer_domain_restriction_with_http_info(playback_restriction_id, body)
340
340
  p status_code # => 2xx
341
341
  p headers # => { ... }
342
- p data # => <PlaybackRestriction>
342
+ p data # => <PlaybackRestrictionResponse>
343
343
  rescue MuxRuby::ApiError => e
344
344
  puts "Error when calling PlaybackRestrictionsApi->update_referrer_domain_restriction_with_http_info: #{e}"
345
345
  end
@@ -354,7 +354,7 @@ end
354
354
 
355
355
  ### Return type
356
356
 
357
- [**PlaybackRestriction**](PlaybackRestriction.md)
357
+ [**PlaybackRestrictionResponse**](PlaybackRestrictionResponse.md)
358
358
 
359
359
  ### Authorization
360
360
 
@@ -8,5 +8,5 @@
8
8
  "gemSourceLocation": "https://github.com/muxinc/mux-ruby",
9
9
  "gemLicense": "MIT",
10
10
  "moduleName": "MuxRuby",
11
- "gemVersion": "3.3.0"
11
+ "gemVersion": "3.3.1"
12
12
  }
@@ -20,14 +20,14 @@ module MuxRuby
20
20
  @api_client = api_client
21
21
  end
22
22
  # Get metric timeseries data
23
- # Returns timeseries data for a specific metric.
23
+ # Returns timeseries data for a specific metric. Each interval represented in the data array contains an array with the following values: * the first element is the interval time * the second element is the calculated metric value * the third element is the number of views in the interval that have a valid metric value
24
24
  # @param metric_id [String] ID of the Metric
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @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;
27
27
  # @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;
28
28
  # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used.
29
29
  # @option opts [String] :order_direction Sort order.
30
- # @option opts [String] :group_by Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is &#x60;ten_minutes&#x60;. Between 6 hours and 15 hours inclusive, the default granularity is &#x60;hour&#x60;. The granularity of timeframes that exceed 15 hours is &#x60;day&#x60;. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity.
30
+ # @option opts [String] :group_by Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is &#x60;ten_minutes&#x60;. Between 6 hours and 15 hours inclusive, the default granularity is &#x60;hour&#x60;. The granularity of timeframes that exceed 15 hours is &#x60;day&#x60;. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity.
31
31
  # @return [GetMetricTimeseriesDataResponse]
32
32
  def get_metric_timeseries_data(metric_id, opts = {})
33
33
  data, _status_code, _headers = get_metric_timeseries_data_with_http_info(metric_id, opts)
@@ -35,14 +35,14 @@ module MuxRuby
35
35
  end
36
36
 
37
37
  # Get metric timeseries data
38
- # Returns timeseries data for a specific metric.
38
+ # Returns timeseries data for a specific metric. Each interval represented in the data array contains an array with the following values: * the first element is the interval time * the second element is the calculated metric value * the third element is the number of views in the interval that have a valid metric value
39
39
  # @param metric_id [String] ID of the Metric
40
40
  # @param [Hash] opts the optional parameters
41
41
  # @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;
42
42
  # @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;
43
43
  # @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used.
44
44
  # @option opts [String] :order_direction Sort order.
45
- # @option opts [String] :group_by Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is &#x60;ten_minutes&#x60;. Between 6 hours and 15 hours inclusive, the default granularity is &#x60;hour&#x60;. The granularity of timeframes that exceed 15 hours is &#x60;day&#x60;. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity.
45
+ # @option opts [String] :group_by Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of 6 hours or less, the default granularity is &#x60;ten_minutes&#x60;. Between 6 hours and 15 hours inclusive, the default granularity is &#x60;hour&#x60;. The granularity of timeframes that exceed 15 hours is &#x60;day&#x60;. This default behaviour is subject to change; it is strongly suggested that you explicitly specify the granularity.
46
46
  # @return [Array<(GetMetricTimeseriesDataResponse, Integer, Hash)>] GetMetricTimeseriesDataResponse data, response status code and response headers
47
47
  def get_metric_timeseries_data_with_http_info(metric_id, opts = {})
48
48
  if @api_client.config.debugging
@@ -23,7 +23,7 @@ module MuxRuby
23
23
  # Create a new Playback Restriction.
24
24
  # @param create_playback_restriction_request [CreatePlaybackRestrictionRequest]
25
25
  # @param [Hash] opts the optional parameters
26
- # @return [PlaybackRestriction]
26
+ # @return [PlaybackRestrictionResponse]
27
27
  def create_playback_restriction(create_playback_restriction_request, opts = {})
28
28
  data, _status_code, _headers = create_playback_restriction_with_http_info(create_playback_restriction_request, opts)
29
29
  data
@@ -33,7 +33,7 @@ module MuxRuby
33
33
  # Create a new Playback Restriction.
34
34
  # @param create_playback_restriction_request [CreatePlaybackRestrictionRequest]
35
35
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(PlaybackRestriction, Integer, Hash)>] PlaybackRestriction data, response status code and response headers
36
+ # @return [Array<(PlaybackRestrictionResponse, Integer, Hash)>] PlaybackRestrictionResponse data, response status code and response headers
37
37
  def create_playback_restriction_with_http_info(create_playback_restriction_request, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: PlaybackRestrictionsApi.create_playback_restriction ...'
@@ -62,7 +62,7 @@ module MuxRuby
62
62
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_playback_restriction_request)
63
63
 
64
64
  # return_type
65
- return_type = opts[:debug_return_type] || 'PlaybackRestriction'
65
+ return_type = opts[:debug_return_type] || 'PlaybackRestrictionResponse'
66
66
 
67
67
  # auth_names
68
68
  auth_names = opts[:debug_auth_names] || ['accessToken']
@@ -149,7 +149,7 @@ module MuxRuby
149
149
  # Retrieves a Playback Restriction associated with the unique identifier.
150
150
  # @param playback_restriction_id [String] ID of the Playback Restriction.
151
151
  # @param [Hash] opts the optional parameters
152
- # @return [PlaybackRestriction]
152
+ # @return [PlaybackRestrictionResponse]
153
153
  def get_playback_restriction(playback_restriction_id, opts = {})
154
154
  data, _status_code, _headers = get_playback_restriction_with_http_info(playback_restriction_id, opts)
155
155
  data
@@ -159,7 +159,7 @@ module MuxRuby
159
159
  # Retrieves a Playback Restriction associated with the unique identifier.
160
160
  # @param playback_restriction_id [String] ID of the Playback Restriction.
161
161
  # @param [Hash] opts the optional parameters
162
- # @return [Array<(PlaybackRestriction, Integer, Hash)>] PlaybackRestriction data, response status code and response headers
162
+ # @return [Array<(PlaybackRestrictionResponse, Integer, Hash)>] PlaybackRestrictionResponse data, response status code and response headers
163
163
  def get_playback_restriction_with_http_info(playback_restriction_id, opts = {})
164
164
  if @api_client.config.debugging
165
165
  @api_client.config.logger.debug 'Calling API: PlaybackRestrictionsApi.get_playback_restriction ...'
@@ -186,7 +186,7 @@ module MuxRuby
186
186
  post_body = opts[:debug_body]
187
187
 
188
188
  # return_type
189
- return_type = opts[:debug_return_type] || 'PlaybackRestriction'
189
+ return_type = opts[:debug_return_type] || 'PlaybackRestrictionResponse'
190
190
 
191
191
  # auth_names
192
192
  auth_names = opts[:debug_auth_names] || ['accessToken']
@@ -213,7 +213,7 @@ module MuxRuby
213
213
  # @param [Hash] opts the optional parameters
214
214
  # @option opts [Integer] :page Offset by this many pages, of the size of &#x60;limit&#x60; (default to 1)
215
215
  # @option opts [Integer] :limit Number of items to include in the response (default to 25)
216
- # @return [Array<PlaybackRestriction>]
216
+ # @return [ListPlaybackRestrictionsResponse]
217
217
  def list_playback_restrictions(opts = {})
218
218
  data, _status_code, _headers = list_playback_restrictions_with_http_info(opts)
219
219
  data
@@ -224,7 +224,7 @@ module MuxRuby
224
224
  # @param [Hash] opts the optional parameters
225
225
  # @option opts [Integer] :page Offset by this many pages, of the size of &#x60;limit&#x60;
226
226
  # @option opts [Integer] :limit Number of items to include in the response
227
- # @return [Array<(Array<PlaybackRestriction>, Integer, Hash)>] Array<PlaybackRestriction> data, response status code and response headers
227
+ # @return [Array<(ListPlaybackRestrictionsResponse, Integer, Hash)>] ListPlaybackRestrictionsResponse data, response status code and response headers
228
228
  def list_playback_restrictions_with_http_info(opts = {})
229
229
  if @api_client.config.debugging
230
230
  @api_client.config.logger.debug 'Calling API: PlaybackRestrictionsApi.list_playback_restrictions ...'
@@ -249,7 +249,7 @@ module MuxRuby
249
249
  post_body = opts[:debug_body]
250
250
 
251
251
  # return_type
252
- return_type = opts[:debug_return_type] || 'Array<PlaybackRestriction>'
252
+ return_type = opts[:debug_return_type] || 'ListPlaybackRestrictionsResponse'
253
253
 
254
254
  # auth_names
255
255
  auth_names = opts[:debug_auth_names] || ['accessToken']
@@ -272,22 +272,22 @@ module MuxRuby
272
272
  end
273
273
 
274
274
  # Update the Referrer Playback Restriction
275
- # Allows you to modify the list of domians 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.
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
276
  # @param playback_restriction_id [String] ID of the Playback Restriction.
277
277
  # @param body [ReferrerDomainRestriction]
278
278
  # @param [Hash] opts the optional parameters
279
- # @return [PlaybackRestriction]
279
+ # @return [PlaybackRestrictionResponse]
280
280
  def update_referrer_domain_restriction(playback_restriction_id, body, opts = {})
281
281
  data, _status_code, _headers = update_referrer_domain_restriction_with_http_info(playback_restriction_id, body, opts)
282
282
  data
283
283
  end
284
284
 
285
285
  # Update the Referrer Playback Restriction
286
- # Allows you to modify the list of domians 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.
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
287
  # @param playback_restriction_id [String] ID of the Playback Restriction.
288
288
  # @param body [ReferrerDomainRestriction]
289
289
  # @param [Hash] opts the optional parameters
290
- # @return [Array<(PlaybackRestriction, Integer, Hash)>] PlaybackRestriction data, response status code and response headers
290
+ # @return [Array<(PlaybackRestrictionResponse, Integer, Hash)>] PlaybackRestrictionResponse data, response status code and response headers
291
291
  def update_referrer_domain_restriction_with_http_info(playback_restriction_id, body, opts = {})
292
292
  if @api_client.config.debugging
293
293
  @api_client.config.logger.debug 'Calling API: PlaybackRestrictionsApi.update_referrer_domain_restriction ...'
@@ -320,7 +320,7 @@ module MuxRuby
320
320
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
321
321
 
322
322
  # return_type
323
- return_type = opts[:debug_return_type] || 'PlaybackRestriction'
323
+ return_type = opts[:debug_return_type] || 'PlaybackRestrictionResponse'
324
324
 
325
325
  # auth_names
326
326
  auth_names = opts[:debug_auth_names] || ['accessToken']
@@ -0,0 +1,220 @@
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 'date'
14
+ require 'time'
15
+
16
+ module MuxRuby
17
+ class ListPlaybackRestrictionsResponse
18
+ attr_accessor :data
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'data' => :'Array<PlaybackRestriction>'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MuxRuby::ListPlaybackRestrictionsResponse` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MuxRuby::ListPlaybackRestrictionsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'data')
61
+ if (value = attributes[:'data']).is_a?(Array)
62
+ self.data = value
63
+ end
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ data == o.data
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Integer] Hash code
96
+ def hash
97
+ [data].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def self.build_from_hash(attributes)
104
+ new.build_from_hash(attributes)
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ self.class.openapi_types.each_pair do |key, type|
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :Time
136
+ Time.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :Boolean
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ # models (e.g. Pet) or oneOf
167
+ klass = MuxRuby.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -15,9 +15,12 @@ require 'time'
15
15
 
16
16
  module MuxRuby
17
17
  class PlaybackRestrictionResponse
18
+ attr_accessor :data
19
+
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
23
+ :'data' => :'data'
21
24
  }
22
25
  end
23
26
 
@@ -29,6 +32,7 @@ module MuxRuby
29
32
  # Attribute type mapping.
30
33
  def self.openapi_types
31
34
  {
35
+ :'data' => :'PlaybackRestriction'
32
36
  }
33
37
  end
34
38
 
@@ -52,6 +56,10 @@ module MuxRuby
52
56
  end
53
57
  h[k.to_sym] = v
54
58
  }
59
+
60
+ if attributes.key?(:'data')
61
+ self.data = attributes[:'data']
62
+ end
55
63
  end
56
64
 
57
65
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -71,7 +79,8 @@ module MuxRuby
71
79
  # @param [Object] Object to be compared
72
80
  def ==(o)
73
81
  return true if self.equal?(o)
74
- self.class == o.class
82
+ self.class == o.class &&
83
+ data == o.data
75
84
  end
76
85
 
77
86
  # @see the `==` method
@@ -83,7 +92,7 @@ module MuxRuby
83
92
  # Calculates hash code according to all attributes.
84
93
  # @return [Integer] Hash code
85
94
  def hash
86
- [].hash
95
+ [data].hash
87
96
  end
88
97
 
89
98
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.0.1
11
11
  =end
12
12
 
13
13
  module MuxRuby
14
- VERSION = '3.3.0'
14
+ VERSION = '3.3.1'
15
15
  end
data/lib/mux_ruby.rb CHANGED
@@ -81,6 +81,7 @@ require 'mux_ruby/models/list_filters_response_data'
81
81
  require 'mux_ruby/models/list_incidents_response'
82
82
  require 'mux_ruby/models/list_insights_response'
83
83
  require 'mux_ruby/models/list_live_streams_response'
84
+ require 'mux_ruby/models/list_playback_restrictions_response'
84
85
  require 'mux_ruby/models/list_real_time_dimensions_response'
85
86
  require 'mux_ruby/models/list_real_time_dimensions_response_data'
86
87
  require 'mux_ruby/models/list_real_time_metrics_response'
@@ -0,0 +1,34 @@
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 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for MuxRuby::ListPlaybackRestrictionsResponse
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe MuxRuby::ListPlaybackRestrictionsResponse do
21
+ let(:instance) { MuxRuby::ListPlaybackRestrictionsResponse.new }
22
+
23
+ describe 'test an instance of ListPlaybackRestrictionsResponse' do
24
+ it 'should create an instance of ListPlaybackRestrictionsResponse' do
25
+ expect(instance).to be_instance_of(MuxRuby::ListPlaybackRestrictionsResponse)
26
+ end
27
+ end
28
+ describe 'test attribute "data"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mux_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mux
@@ -134,6 +134,7 @@ files:
134
134
  - docs/ListIncidentsResponse.md
135
135
  - docs/ListInsightsResponse.md
136
136
  - docs/ListLiveStreamsResponse.md
137
+ - docs/ListPlaybackRestrictionsResponse.md
137
138
  - docs/ListRealTimeDimensionsResponse.md
138
139
  - docs/ListRealTimeDimensionsResponseData.md
139
140
  - docs/ListRealTimeMetricsResponse.md
@@ -323,6 +324,7 @@ files:
323
324
  - lib/mux_ruby/models/list_incidents_response.rb
324
325
  - lib/mux_ruby/models/list_insights_response.rb
325
326
  - lib/mux_ruby/models/list_live_streams_response.rb
327
+ - lib/mux_ruby/models/list_playback_restrictions_response.rb
326
328
  - lib/mux_ruby/models/list_real_time_dimensions_response.rb
327
329
  - lib/mux_ruby/models/list_real_time_dimensions_response_data.rb
328
330
  - lib/mux_ruby/models/list_real_time_metrics_response.rb
@@ -450,6 +452,7 @@ files:
450
452
  - spec/models/list_incidents_response_spec.rb
451
453
  - spec/models/list_insights_response_spec.rb
452
454
  - spec/models/list_live_streams_response_spec.rb
455
+ - spec/models/list_playback_restrictions_response_spec.rb
453
456
  - spec/models/list_real_time_dimensions_response_data_spec.rb
454
457
  - spec/models/list_real_time_dimensions_response_spec.rb
455
458
  - spec/models/list_real_time_metrics_response_spec.rb
@@ -644,6 +647,7 @@ test_files:
644
647
  - spec/models/score_spec.rb
645
648
  - spec/models/live_stream_status_spec.rb
646
649
  - spec/models/dimension_value_spec.rb
650
+ - spec/models/list_playback_restrictions_response_spec.rb
647
651
  - spec/models/simulcast_target_response_spec.rb
648
652
  - spec/models/real_time_histogram_timeseries_datapoint_spec.rb
649
653
  - spec/spec_helper.rb