mux_ruby 1.7.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/docs/DimensionValue.md +9 -0
- data/docs/DimensionsApi.md +118 -0
- data/docs/FiltersApi.md +2 -2
- data/docs/GetRealTimeBreakdownResponse.md +10 -0
- data/docs/GetRealTimeHistogramTimeseriesResponse.md +11 -0
- data/docs/GetRealTimeHistogramTimeseriesResponseMeta.md +8 -0
- data/docs/GetRealTimeTimeseriesResponse.md +10 -0
- data/docs/Incident.md +28 -0
- data/docs/IncidentBreakdown.md +10 -0
- data/docs/IncidentNotification.md +10 -0
- data/docs/IncidentNotificationRule.md +12 -0
- data/docs/IncidentResponse.md +9 -0
- data/docs/IncidentsApi.md +186 -0
- data/docs/ListDimensionValuesResponse.md +10 -0
- data/docs/ListDimensionsResponse.md +10 -0
- data/docs/ListIncidentsResponse.md +10 -0
- data/docs/ListRealTimeDimensionsResponse.md +10 -0
- data/docs/ListRealTimeDimensionsResponseData.md +9 -0
- data/docs/ListRealTimeMetricsResponse.md +10 -0
- data/docs/ListRelatedIncidentsResponse.md +10 -0
- data/docs/NotificationRule.md +10 -0
- data/docs/RealTimeApi.md +280 -0
- data/docs/RealTimeBreakdownValue.md +12 -0
- data/docs/RealTimeHistogramTimeseriesBucket.md +9 -0
- data/docs/RealTimeHistogramTimeseriesBucketValues.md +9 -0
- data/docs/RealTimeHistogramTimeseriesDatapoint.md +14 -0
- data/docs/RealTimeTimeseriesDatapoint.md +10 -0
- data/examples/data/exercise-dimensions.rb +29 -0
- data/examples/data/exercise-incidents.rb +29 -0
- data/examples/data/exercise-realtime.rb +60 -0
- data/lib/mux_ruby.rb +26 -0
- data/lib/mux_ruby/api/dimensions_api.rb +128 -0
- data/lib/mux_ruby/api/filters_api.rb +4 -4
- data/lib/mux_ruby/api/incidents_api.rb +217 -0
- data/lib/mux_ruby/api/real_time_api.rb +311 -0
- data/lib/mux_ruby/models/asset.rb +12 -0
- data/lib/mux_ruby/models/dimension_value.rb +193 -0
- data/lib/mux_ruby/models/get_real_time_breakdown_response.rb +206 -0
- data/lib/mux_ruby/models/get_real_time_histogram_timeseries_response.rb +215 -0
- data/lib/mux_ruby/models/get_real_time_histogram_timeseries_response_meta.rb +186 -0
- data/lib/mux_ruby/models/get_real_time_timeseries_response.rb +206 -0
- data/lib/mux_ruby/models/incident.rb +370 -0
- data/lib/mux_ruby/models/incident_breakdown.rb +202 -0
- data/lib/mux_ruby/models/incident_notification.rb +202 -0
- data/lib/mux_ruby/models/incident_notification_rule.rb +222 -0
- data/lib/mux_ruby/models/incident_response.rb +195 -0
- data/lib/mux_ruby/models/list_dimension_values_response.rb +206 -0
- data/lib/mux_ruby/models/list_dimensions_response.rb +204 -0
- data/lib/mux_ruby/models/list_incidents_response.rb +206 -0
- data/lib/mux_ruby/models/list_real_time_dimensions_response.rb +206 -0
- data/lib/mux_ruby/models/list_real_time_dimensions_response_data.rb +193 -0
- data/lib/mux_ruby/models/list_real_time_metrics_response.rb +206 -0
- data/lib/mux_ruby/models/list_related_incidents_response.rb +206 -0
- data/lib/mux_ruby/models/notification_rule.rb +202 -0
- data/lib/mux_ruby/models/real_time_breakdown_value.rb +220 -0
- data/lib/mux_ruby/models/real_time_histogram_timeseries_bucket.rb +193 -0
- data/lib/mux_ruby/models/real_time_histogram_timeseries_bucket_values.rb +193 -0
- data/lib/mux_ruby/models/real_time_histogram_timeseries_datapoint.rb +240 -0
- data/lib/mux_ruby/models/real_time_timeseries_datapoint.rb +202 -0
- data/lib/mux_ruby/version.rb +1 -1
- data/spec/api/dimensions_api_spec.rb +55 -0
- data/spec/api/filters_api_spec.rb +2 -2
- data/spec/api/incidents_api_spec.rb +73 -0
- data/spec/api/real_time_api_spec.rb +93 -0
- data/spec/models/asset_spec.rb +4 -0
- data/spec/models/dimension_value_spec.rb +40 -0
- data/spec/models/get_real_time_breakdown_response_spec.rb +46 -0
- data/spec/models/get_real_time_histogram_timeseries_response_meta_spec.rb +34 -0
- data/spec/models/get_real_time_histogram_timeseries_response_spec.rb +52 -0
- data/spec/models/get_real_time_timeseries_response_spec.rb +46 -0
- data/spec/models/incident_breakdown_spec.rb +46 -0
- data/spec/models/incident_notification_rule_spec.rb +58 -0
- data/spec/models/incident_notification_spec.rb +46 -0
- data/spec/models/incident_response_spec.rb +40 -0
- data/spec/models/incident_spec.rb +154 -0
- data/spec/models/list_dimension_values_response_spec.rb +46 -0
- data/spec/models/list_dimensions_response_spec.rb +46 -0
- data/spec/models/list_incidents_response_spec.rb +46 -0
- data/spec/models/list_real_time_dimensions_response_data_spec.rb +40 -0
- data/spec/models/list_real_time_dimensions_response_spec.rb +46 -0
- data/spec/models/list_real_time_metrics_response_spec.rb +46 -0
- data/spec/models/list_related_incidents_response_spec.rb +46 -0
- data/spec/models/notification_rule_spec.rb +46 -0
- data/spec/models/real_time_breakdown_value_spec.rb +58 -0
- data/spec/models/real_time_histogram_timeseries_bucket_spec.rb +40 -0
- data/spec/models/real_time_histogram_timeseries_bucket_values_spec.rb +40 -0
- data/spec/models/real_time_histogram_timeseries_datapoint_spec.rb +70 -0
- data/spec/models/real_time_timeseries_datapoint_spec.rb +46 -0
- metadata +171 -64
@@ -0,0 +1,10 @@
|
|
1
|
+
# MuxRuby::ListDimensionValuesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**data** | [**Array<DimensionValue>**](DimensionValue.md) | | [optional]
|
7
|
+
**total_row_count** | **Integer** | | [optional]
|
8
|
+
**timeframe** | **Array<Integer>** | | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# MuxRuby::ListDimensionsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**data** | [**ListFiltersResponseData**](ListFiltersResponseData.md) | | [optional]
|
7
|
+
**total_row_count** | **Integer** | | [optional]
|
8
|
+
**timeframe** | **Array<Integer>** | | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# MuxRuby::ListIncidentsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**data** | [**Array<Incident>**](Incident.md) | | [optional]
|
7
|
+
**total_row_count** | **Integer** | | [optional]
|
8
|
+
**timeframe** | **Array<Integer>** | | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# MuxRuby::ListRealTimeDimensionsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**data** | [**Array<ListRealTimeDimensionsResponseData>**](ListRealTimeDimensionsResponseData.md) | | [optional]
|
7
|
+
**total_row_count** | **Integer** | | [optional]
|
8
|
+
**timeframe** | **Array<Integer>** | | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# MuxRuby::ListRealTimeMetricsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**data** | [**Array<ListRealTimeDimensionsResponseData>**](ListRealTimeDimensionsResponseData.md) | | [optional]
|
7
|
+
**total_row_count** | **Integer** | | [optional]
|
8
|
+
**timeframe** | **Array<Integer>** | | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# MuxRuby::ListRelatedIncidentsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**data** | [**Array<Incident>**](Incident.md) | | [optional]
|
7
|
+
**total_row_count** | **Integer** | | [optional]
|
8
|
+
**timeframe** | **Array<Integer>** | | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# MuxRuby::NotificationRule
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**value** | **String** | | [optional]
|
7
|
+
**name** | **String** | | [optional]
|
8
|
+
**id** | **String** | | [optional]
|
9
|
+
|
10
|
+
|
data/docs/RealTimeApi.md
ADDED
@@ -0,0 +1,280 @@
|
|
1
|
+
# MuxRuby::RealTimeApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.mux.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**get_realtime_breakdown**](RealTimeApi.md#get_realtime_breakdown) | **GET** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/breakdown | Get Real-Time Breakdown
|
8
|
+
[**get_realtime_histogram_timeseries**](RealTimeApi.md#get_realtime_histogram_timeseries) | **GET** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/histogram-timeseries | Get Real-Time Histogram Timeseries
|
9
|
+
[**get_realtime_timeseries**](RealTimeApi.md#get_realtime_timeseries) | **GET** /data/v1/realtime/metrics/{REALTIME_METRIC_ID}/timeseries | Get Real-Time Timeseries
|
10
|
+
[**list_realtime_dimensions**](RealTimeApi.md#list_realtime_dimensions) | **GET** /data/v1/realtime/dimensions | List Real-Time Dimensions
|
11
|
+
[**list_realtime_metrics**](RealTimeApi.md#list_realtime_metrics) | **GET** /data/v1/realtime/metrics | List Real-Time Metrics
|
12
|
+
|
13
|
+
|
14
|
+
# **get_realtime_breakdown**
|
15
|
+
> GetRealTimeBreakdownResponse get_realtime_breakdown(realtime_metric_id, opts)
|
16
|
+
|
17
|
+
Get Real-Time Breakdown
|
18
|
+
|
19
|
+
Gets breakdown information for a specific dimension and metric along with the number of concurrent viewers and negative impact score.
|
20
|
+
|
21
|
+
### Example
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'mux_ruby'
|
25
|
+
# setup authorization
|
26
|
+
MuxRuby.configure do |config|
|
27
|
+
# Configure HTTP basic authorization: accessToken
|
28
|
+
config.username = 'YOUR USERNAME'
|
29
|
+
config.password = 'YOUR PASSWORD'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = MuxRuby::RealTimeApi.new
|
33
|
+
realtime_metric_id = 'video-startup-time' # String | ID of the Realtime Metric
|
34
|
+
opts = {
|
35
|
+
dimension: 'dimension_example', # String | Dimension the specified value belongs to
|
36
|
+
timestamp: 3.4, # Float | Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp.
|
37
|
+
filters: ['filters_example'], # Array<String> | 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.
|
38
|
+
order_by: 'order_by_example', # String | Value to order the results by
|
39
|
+
order_direction: 'order_direction_example' # String | Sort order.
|
40
|
+
}
|
41
|
+
|
42
|
+
begin
|
43
|
+
#Get Real-Time Breakdown
|
44
|
+
result = api_instance.get_realtime_breakdown(realtime_metric_id, opts)
|
45
|
+
p result
|
46
|
+
rescue MuxRuby::ApiError => e
|
47
|
+
puts "Exception when calling RealTimeApi->get_realtime_breakdown: #{e}"
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
### Parameters
|
52
|
+
|
53
|
+
Name | Type | Description | Notes
|
54
|
+
------------- | ------------- | ------------- | -------------
|
55
|
+
**realtime_metric_id** | **String**| ID of the Realtime Metric |
|
56
|
+
**dimension** | **String**| Dimension the specified value belongs to | [optional]
|
57
|
+
**timestamp** | **Float**| Timestamp to limit results by. This value must be provided as a unix timestamp. Defaults to the current unix timestamp. | [optional]
|
58
|
+
**filters** | [**Array<String>**](String.md)| 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. | [optional]
|
59
|
+
**order_by** | **String**| Value to order the results by | [optional]
|
60
|
+
**order_direction** | **String**| Sort order. | [optional]
|
61
|
+
|
62
|
+
### Return type
|
63
|
+
|
64
|
+
[**GetRealTimeBreakdownResponse**](GetRealTimeBreakdownResponse.md)
|
65
|
+
|
66
|
+
### Authorization
|
67
|
+
|
68
|
+
[accessToken](../README.md#accessToken)
|
69
|
+
|
70
|
+
### HTTP request headers
|
71
|
+
|
72
|
+
- **Content-Type**: Not defined
|
73
|
+
- **Accept**: application/json
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
# **get_realtime_histogram_timeseries**
|
78
|
+
> GetRealTimeHistogramTimeseriesResponse get_realtime_histogram_timeseries(realtime_metric_id, opts)
|
79
|
+
|
80
|
+
Get Real-Time Histogram Timeseries
|
81
|
+
|
82
|
+
Gets histogram timeseries information for a specific metric.
|
83
|
+
|
84
|
+
### Example
|
85
|
+
```ruby
|
86
|
+
# load the gem
|
87
|
+
require 'mux_ruby'
|
88
|
+
# setup authorization
|
89
|
+
MuxRuby.configure do |config|
|
90
|
+
# Configure HTTP basic authorization: accessToken
|
91
|
+
config.username = 'YOUR USERNAME'
|
92
|
+
config.password = 'YOUR PASSWORD'
|
93
|
+
end
|
94
|
+
|
95
|
+
api_instance = MuxRuby::RealTimeApi.new
|
96
|
+
realtime_metric_id = 'video-startup-time' # String | ID of the Realtime Metric
|
97
|
+
opts = {
|
98
|
+
filters: ['filters_example'] # Array<String> | 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.
|
99
|
+
}
|
100
|
+
|
101
|
+
begin
|
102
|
+
#Get Real-Time Histogram Timeseries
|
103
|
+
result = api_instance.get_realtime_histogram_timeseries(realtime_metric_id, opts)
|
104
|
+
p result
|
105
|
+
rescue MuxRuby::ApiError => e
|
106
|
+
puts "Exception when calling RealTimeApi->get_realtime_histogram_timeseries: #{e}"
|
107
|
+
end
|
108
|
+
```
|
109
|
+
|
110
|
+
### Parameters
|
111
|
+
|
112
|
+
Name | Type | Description | Notes
|
113
|
+
------------- | ------------- | ------------- | -------------
|
114
|
+
**realtime_metric_id** | **String**| ID of the Realtime Metric |
|
115
|
+
**filters** | [**Array<String>**](String.md)| 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. | [optional]
|
116
|
+
|
117
|
+
### Return type
|
118
|
+
|
119
|
+
[**GetRealTimeHistogramTimeseriesResponse**](GetRealTimeHistogramTimeseriesResponse.md)
|
120
|
+
|
121
|
+
### Authorization
|
122
|
+
|
123
|
+
[accessToken](../README.md#accessToken)
|
124
|
+
|
125
|
+
### HTTP request headers
|
126
|
+
|
127
|
+
- **Content-Type**: Not defined
|
128
|
+
- **Accept**: application/json
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
# **get_realtime_timeseries**
|
133
|
+
> GetRealTimeTimeseriesResponse get_realtime_timeseries(realtime_metric_id, opts)
|
134
|
+
|
135
|
+
Get Real-Time Timeseries
|
136
|
+
|
137
|
+
Gets Time series information for a specific metric along with the number of concurrent viewers.
|
138
|
+
|
139
|
+
### Example
|
140
|
+
```ruby
|
141
|
+
# load the gem
|
142
|
+
require 'mux_ruby'
|
143
|
+
# setup authorization
|
144
|
+
MuxRuby.configure do |config|
|
145
|
+
# Configure HTTP basic authorization: accessToken
|
146
|
+
config.username = 'YOUR USERNAME'
|
147
|
+
config.password = 'YOUR PASSWORD'
|
148
|
+
end
|
149
|
+
|
150
|
+
api_instance = MuxRuby::RealTimeApi.new
|
151
|
+
realtime_metric_id = 'video-startup-time' # String | ID of the Realtime Metric
|
152
|
+
opts = {
|
153
|
+
filters: ['filters_example'] # Array<String> | 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.
|
154
|
+
}
|
155
|
+
|
156
|
+
begin
|
157
|
+
#Get Real-Time Timeseries
|
158
|
+
result = api_instance.get_realtime_timeseries(realtime_metric_id, opts)
|
159
|
+
p result
|
160
|
+
rescue MuxRuby::ApiError => e
|
161
|
+
puts "Exception when calling RealTimeApi->get_realtime_timeseries: #{e}"
|
162
|
+
end
|
163
|
+
```
|
164
|
+
|
165
|
+
### Parameters
|
166
|
+
|
167
|
+
Name | Type | Description | Notes
|
168
|
+
------------- | ------------- | ------------- | -------------
|
169
|
+
**realtime_metric_id** | **String**| ID of the Realtime Metric |
|
170
|
+
**filters** | [**Array<String>**](String.md)| 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. | [optional]
|
171
|
+
|
172
|
+
### Return type
|
173
|
+
|
174
|
+
[**GetRealTimeTimeseriesResponse**](GetRealTimeTimeseriesResponse.md)
|
175
|
+
|
176
|
+
### Authorization
|
177
|
+
|
178
|
+
[accessToken](../README.md#accessToken)
|
179
|
+
|
180
|
+
### HTTP request headers
|
181
|
+
|
182
|
+
- **Content-Type**: Not defined
|
183
|
+
- **Accept**: application/json
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
# **list_realtime_dimensions**
|
188
|
+
> ListRealTimeDimensionsResponse list_realtime_dimensions
|
189
|
+
|
190
|
+
List Real-Time Dimensions
|
191
|
+
|
192
|
+
Lists availiable real-time dimensions
|
193
|
+
|
194
|
+
### Example
|
195
|
+
```ruby
|
196
|
+
# load the gem
|
197
|
+
require 'mux_ruby'
|
198
|
+
# setup authorization
|
199
|
+
MuxRuby.configure do |config|
|
200
|
+
# Configure HTTP basic authorization: accessToken
|
201
|
+
config.username = 'YOUR USERNAME'
|
202
|
+
config.password = 'YOUR PASSWORD'
|
203
|
+
end
|
204
|
+
|
205
|
+
api_instance = MuxRuby::RealTimeApi.new
|
206
|
+
|
207
|
+
begin
|
208
|
+
#List Real-Time Dimensions
|
209
|
+
result = api_instance.list_realtime_dimensions
|
210
|
+
p result
|
211
|
+
rescue MuxRuby::ApiError => e
|
212
|
+
puts "Exception when calling RealTimeApi->list_realtime_dimensions: #{e}"
|
213
|
+
end
|
214
|
+
```
|
215
|
+
|
216
|
+
### Parameters
|
217
|
+
This endpoint does not need any parameter.
|
218
|
+
|
219
|
+
### Return type
|
220
|
+
|
221
|
+
[**ListRealTimeDimensionsResponse**](ListRealTimeDimensionsResponse.md)
|
222
|
+
|
223
|
+
### Authorization
|
224
|
+
|
225
|
+
[accessToken](../README.md#accessToken)
|
226
|
+
|
227
|
+
### HTTP request headers
|
228
|
+
|
229
|
+
- **Content-Type**: Not defined
|
230
|
+
- **Accept**: application/json
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
# **list_realtime_metrics**
|
235
|
+
> ListRealTimeMetricsResponse list_realtime_metrics
|
236
|
+
|
237
|
+
List Real-Time Metrics
|
238
|
+
|
239
|
+
Lists availiable real-time metrics.
|
240
|
+
|
241
|
+
### Example
|
242
|
+
```ruby
|
243
|
+
# load the gem
|
244
|
+
require 'mux_ruby'
|
245
|
+
# setup authorization
|
246
|
+
MuxRuby.configure do |config|
|
247
|
+
# Configure HTTP basic authorization: accessToken
|
248
|
+
config.username = 'YOUR USERNAME'
|
249
|
+
config.password = 'YOUR PASSWORD'
|
250
|
+
end
|
251
|
+
|
252
|
+
api_instance = MuxRuby::RealTimeApi.new
|
253
|
+
|
254
|
+
begin
|
255
|
+
#List Real-Time Metrics
|
256
|
+
result = api_instance.list_realtime_metrics
|
257
|
+
p result
|
258
|
+
rescue MuxRuby::ApiError => e
|
259
|
+
puts "Exception when calling RealTimeApi->list_realtime_metrics: #{e}"
|
260
|
+
end
|
261
|
+
```
|
262
|
+
|
263
|
+
### Parameters
|
264
|
+
This endpoint does not need any parameter.
|
265
|
+
|
266
|
+
### Return type
|
267
|
+
|
268
|
+
[**ListRealTimeMetricsResponse**](ListRealTimeMetricsResponse.md)
|
269
|
+
|
270
|
+
### Authorization
|
271
|
+
|
272
|
+
[accessToken](../README.md#accessToken)
|
273
|
+
|
274
|
+
### HTTP request headers
|
275
|
+
|
276
|
+
- **Content-Type**: Not defined
|
277
|
+
- **Accept**: application/json
|
278
|
+
|
279
|
+
|
280
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# MuxRuby::RealTimeBreakdownValue
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**value** | **String** | | [optional]
|
7
|
+
**negative_impact** | **Integer** | | [optional]
|
8
|
+
**metric_value** | **Float** | | [optional]
|
9
|
+
**display_value** | **String** | | [optional]
|
10
|
+
**concurent_viewers** | **Integer** | | [optional]
|
11
|
+
|
12
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# MuxRuby::RealTimeHistogramTimeseriesDatapoint
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**timestamp** | **String** | | [optional]
|
7
|
+
**sum** | **Integer** | | [optional]
|
8
|
+
**p95** | **Float** | | [optional]
|
9
|
+
**median** | **Float** | | [optional]
|
10
|
+
**max_percentage** | **Float** | | [optional]
|
11
|
+
**bucket_values** | [**Array<RealTimeHistogramTimeseriesBucketValues>**](RealTimeHistogramTimeseriesBucketValues.md) | | [optional]
|
12
|
+
**average** | **Float** | | [optional]
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# MuxRuby::RealTimeTimeseriesDatapoint
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**value** | **Float** | | [optional]
|
7
|
+
**date** | **String** | | [optional]
|
8
|
+
**concurent_viewers** | **Integer** | | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'mux_ruby'
|
4
|
+
require 'solid_assert'
|
5
|
+
|
6
|
+
SolidAssert.enable_assertions
|
7
|
+
|
8
|
+
# Authentication Setup
|
9
|
+
openapi = MuxRuby.configure do |config|
|
10
|
+
config.username = ENV['MUX_TOKEN_ID']
|
11
|
+
config.password = ENV['MUX_TOKEN_SECRET']
|
12
|
+
end
|
13
|
+
|
14
|
+
# API Client Initialization
|
15
|
+
dimensions_api = MuxRuby::DimensionsApi.new
|
16
|
+
|
17
|
+
# ========== list-dimensions ==========
|
18
|
+
dimensions = dimensions_api.list_dimensions()
|
19
|
+
assert dimensions != nil
|
20
|
+
assert dimensions.data != nil
|
21
|
+
assert dimensions.data.basic != nil
|
22
|
+
assert dimensions.data.advanced != nil
|
23
|
+
puts "list-dimensions OK ✅"
|
24
|
+
|
25
|
+
# ========== list-dimension-values ==========
|
26
|
+
dimension_values = dimensions_api.list_dimension_values("browser", {:timeframe => ['7:days']})
|
27
|
+
assert dimension_values != nil
|
28
|
+
assert dimension_values.data != nil
|
29
|
+
puts "list-dimension-values OK ✅"
|