mux_ruby 1.8.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -1
- data/Gemfile.lock +26 -37
- data/README.md +37 -13
- data/docs/AbridgedVideoView.md +33 -13
- data/docs/Asset.md +59 -25
- data/docs/AssetErrors.md +15 -4
- data/docs/AssetMaster.md +15 -4
- data/docs/AssetNonStandardInputReasons.md +29 -11
- data/docs/AssetRecordingTimes.md +15 -4
- data/docs/AssetResponse.md +13 -3
- data/docs/AssetStaticRenditions.md +15 -4
- data/docs/AssetStaticRenditionsFiles.md +23 -8
- data/docs/AssetsApi.md +396 -161
- data/docs/BreakdownValue.md +21 -7
- data/docs/CreateAssetRequest.md +27 -10
- data/docs/CreateLiveStreamRequest.md +27 -9
- data/docs/CreatePlaybackIDRequest.md +13 -3
- data/docs/CreatePlaybackIDResponse.md +13 -3
- data/docs/CreateSimulcastTargetRequest.md +17 -5
- data/docs/CreateTrackRequest.md +25 -9
- data/docs/CreateTrackResponse.md +13 -3
- data/docs/CreateUploadRequest.md +19 -6
- data/docs/DeliveryReport.md +27 -9
- data/docs/DeliveryUsageApi.md +41 -23
- data/docs/DimensionValue.md +15 -4
- data/docs/DimensionsApi.md +72 -34
- data/docs/DirectUploadsApi.md +131 -56
- data/docs/DisableLiveStreamResponse.md +13 -3
- data/docs/EnableLiveStreamResponse.md +13 -3
- data/docs/Error.md +27 -10
- data/docs/ErrorsApi.md +38 -20
- data/docs/ExportDate.md +20 -0
- data/docs/ExportFile.md +22 -0
- data/docs/ExportsApi.md +99 -12
- data/docs/FilterValue.md +15 -4
- data/docs/FiltersApi.md +71 -33
- data/docs/GetAssetInputInfoResponse.md +13 -3
- data/docs/GetAssetOrLiveStreamIdResponse.md +18 -0
- data/docs/GetAssetOrLiveStreamIdResponseData.md +22 -0
- data/docs/GetAssetOrLiveStreamIdResponseDataObject.md +20 -0
- data/docs/GetAssetPlaybackIDResponse.md +13 -3
- data/docs/GetMetricTimeseriesDataResponse.md +17 -5
- data/docs/GetOverallValuesResponse.md +17 -5
- data/docs/GetRealTimeBreakdownResponse.md +17 -5
- data/docs/GetRealTimeHistogramTimeseriesResponse.md +19 -6
- data/docs/GetRealTimeHistogramTimeseriesResponseMeta.md +13 -3
- data/docs/GetRealTimeTimeseriesResponse.md +17 -5
- data/docs/Incident.md +53 -23
- data/docs/IncidentBreakdown.md +17 -5
- data/docs/IncidentNotification.md +17 -5
- data/docs/IncidentNotificationRule.md +21 -7
- data/docs/IncidentResponse.md +15 -4
- data/docs/IncidentsApi.md +118 -62
- data/docs/InputFile.md +15 -4
- data/docs/InputInfo.md +15 -4
- data/docs/InputSettings.md +31 -10
- data/docs/InputSettingsOverlaySettings.md +25 -9
- data/docs/InputTrack.md +29 -11
- data/docs/Insight.md +23 -8
- data/docs/ListAllMetricValuesResponse.md +17 -5
- data/docs/ListAssetsResponse.md +13 -3
- data/docs/ListBreakdownValuesResponse.md +17 -5
- data/docs/ListDeliveryUsageResponse.md +19 -6
- data/docs/ListDimensionValuesResponse.md +17 -5
- data/docs/ListDimensionsResponse.md +17 -5
- data/docs/ListErrorsResponse.md +17 -5
- data/docs/ListExportsResponse.md +17 -5
- data/docs/ListFilterValuesResponse.md +17 -5
- data/docs/ListFiltersResponse.md +17 -5
- data/docs/ListFiltersResponseData.md +15 -4
- data/docs/ListIncidentsResponse.md +17 -5
- data/docs/ListInsightsResponse.md +17 -5
- data/docs/ListLiveStreamsResponse.md +13 -3
- data/docs/ListRealTimeDimensionsResponse.md +17 -5
- data/docs/ListRealTimeDimensionsResponseData.md +15 -4
- data/docs/ListRealTimeMetricsResponse.md +17 -5
- data/docs/ListRelatedIncidentsResponse.md +17 -5
- data/docs/ListSigningKeysResponse.md +13 -3
- data/docs/ListUploadsResponse.md +13 -3
- data/docs/ListVideoViewExportsResponse.md +22 -0
- data/docs/ListVideoViewsResponse.md +17 -5
- data/docs/LiveStream.md +39 -15
- data/docs/LiveStreamResponse.md +13 -3
- data/docs/LiveStreamsApi.md +418 -170
- data/docs/Metric.md +21 -7
- data/docs/MetricsApi.md +211 -117
- data/docs/NotificationRule.md +17 -5
- data/docs/OverallValues.md +19 -6
- data/docs/PlaybackID.md +15 -4
- data/docs/PlaybackIDApi.md +78 -0
- data/docs/PlaybackPolicy.md +10 -2
- data/docs/RealTimeApi.md +177 -81
- data/docs/RealTimeBreakdownValue.md +21 -7
- data/docs/RealTimeHistogramTimeseriesBucket.md +15 -4
- data/docs/RealTimeHistogramTimeseriesBucketValues.md +15 -4
- data/docs/RealTimeHistogramTimeseriesDatapoint.md +25 -9
- data/docs/RealTimeTimeseriesDatapoint.md +17 -5
- data/docs/Score.md +23 -8
- data/docs/SignalLiveStreamCompleteResponse.md +13 -3
- data/docs/SigningKey.md +17 -5
- data/docs/SigningKeyResponse.md +13 -3
- data/docs/SimulcastTarget.md +21 -7
- data/docs/SimulcastTargetResponse.md +13 -3
- data/docs/Track.md +37 -15
- data/docs/URLSigningKeysApi.md +130 -54
- data/docs/UpdateAssetMP4SupportRequest.md +13 -3
- data/docs/UpdateAssetMasterAccessRequest.md +13 -3
- data/docs/Upload.md +29 -11
- data/docs/UploadError.md +15 -4
- data/docs/UploadResponse.md +13 -3
- data/docs/VideoView.md +251 -114
- data/docs/VideoViewEvent.md +19 -6
- data/docs/VideoViewResponse.md +15 -4
- data/docs/VideoViewsApi.md +78 -41
- data/examples/video/exercise-assets.rb +21 -0
- data/examples/video/exercise-live-streams.rb +8 -0
- data/gen/.gitignore +7 -0
- data/gen/Makefile +31 -0
- data/gen/generator-config.json +11 -0
- data/gen/openapitools.json +7 -0
- data/gen/package.json +17 -0
- data/gen/templates/Gemfile.mustache +11 -0
- data/gen/templates/README.mustache +158 -0
- data/gen/templates/Rakefile.mustache +10 -0
- data/gen/templates/api.mustache +206 -0
- data/gen/templates/api_client.mustache +264 -0
- data/gen/templates/api_client_faraday_partial.mustache +138 -0
- data/gen/templates/api_client_spec.mustache +220 -0
- data/gen/templates/api_client_typhoeus_partial.mustache +183 -0
- data/gen/templates/api_doc.mustache +118 -0
- data/gen/templates/api_error.mustache +67 -0
- data/gen/templates/api_info.mustache +12 -0
- data/gen/templates/api_test.mustache +47 -0
- data/gen/templates/base_object.mustache +120 -0
- data/gen/templates/configuration.mustache +349 -0
- data/gen/templates/configuration_spec.mustache +34 -0
- data/gen/templates/configuration_tls_faraday_partial.mustache +29 -0
- data/gen/templates/configuration_tls_typhoeus_partial.mustache +34 -0
- data/gen/templates/gem.mustache +40 -0
- data/gen/templates/gemspec.mustache +35 -0
- data/gen/templates/gitignore.mustache +39 -0
- data/gen/templates/model.mustache +26 -0
- data/gen/templates/model_doc.mustache +12 -0
- data/gen/templates/model_test.mustache +77 -0
- data/gen/templates/partial_model_enum_class.mustache +20 -0
- data/gen/templates/partial_model_generic.mustache +371 -0
- data/gen/templates/partial_model_generic_doc.mustache +28 -0
- data/gen/templates/partial_oneof_module.mustache +137 -0
- data/gen/templates/partial_oneof_module_doc.mustache +92 -0
- data/gen/templates/rspec.mustache +2 -0
- data/gen/templates/rubocop.mustache +148 -0
- data/gen/templates/spec_helper.mustache +103 -0
- data/gen/templates/version.mustache +7 -0
- data/gen/yarn.lock +1878 -0
- data/lib/mux_ruby.rb +16 -2
- data/lib/mux_ruby/api/assets_api.rb +291 -152
- data/lib/mux_ruby/api/delivery_usage_api.rb +32 -16
- data/lib/mux_ruby/api/dimensions_api.rb +55 -29
- data/lib/mux_ruby/api/direct_uploads_api.rb +90 -44
- data/lib/mux_ruby/api/errors_api.rb +34 -18
- data/lib/mux_ruby/api/exports_api.rb +86 -13
- data/lib/mux_ruby/api/filters_api.rb +53 -27
- data/lib/mux_ruby/api/incidents_api.rb +94 -52
- data/lib/mux_ruby/api/live_streams_api.rb +299 -157
- data/lib/mux_ruby/api/metrics_api.rb +193 -122
- data/lib/mux_ruby/api/playback_id_api.rb +85 -0
- data/lib/mux_ruby/api/real_time_api.rb +149 -87
- data/lib/mux_ruby/api/url_signing_keys_api.rb +95 -48
- data/lib/mux_ruby/api/video_views_api.rb +60 -33
- data/lib/mux_ruby/api_client.rb +106 -91
- data/lib/mux_ruby/api_error.rb +35 -7
- data/lib/mux_ruby/configuration.rb +50 -14
- data/lib/mux_ruby/models/abridged_video_view.rb +58 -24
- data/lib/mux_ruby/models/asset.rb +129 -58
- data/lib/mux_ruby/models/asset_errors.rb +52 -15
- data/lib/mux_ruby/models/asset_master.rb +85 -15
- data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +78 -43
- data/lib/mux_ruby/models/asset_recording_times.rb +52 -18
- data/lib/mux_ruby/models/asset_response.rb +48 -14
- data/lib/mux_ruby/models/asset_static_renditions.rb +55 -19
- data/lib/mux_ruby/models/asset_static_renditions_files.rb +60 -25
- data/lib/mux_ruby/models/breakdown_value.rb +52 -18
- data/lib/mux_ruby/models/create_asset_request.rb +70 -30
- data/lib/mux_ruby/models/create_live_stream_request.rb +68 -23
- data/lib/mux_ruby/models/create_playback_id_request.rb +48 -14
- data/lib/mux_ruby/models/create_playback_id_response.rb +48 -14
- data/lib/mux_ruby/models/create_simulcast_target_request.rb +50 -16
- data/lib/mux_ruby/models/create_track_request.rb +65 -27
- data/lib/mux_ruby/models/create_track_response.rb +48 -14
- data/lib/mux_ruby/models/create_upload_request.rb +52 -18
- data/lib/mux_ruby/models/delivery_report.rb +106 -21
- data/lib/mux_ruby/models/dimension_value.rb +49 -15
- data/lib/mux_ruby/models/disable_live_stream_response.rb +48 -14
- data/lib/mux_ruby/models/enable_live_stream_response.rb +48 -14
- data/lib/mux_ruby/models/error.rb +63 -21
- data/lib/mux_ruby/models/export_date.rb +229 -0
- data/lib/mux_ruby/models/export_file.rb +236 -0
- data/lib/mux_ruby/models/filter_value.rb +49 -15
- data/lib/mux_ruby/models/get_asset_input_info_response.rb +48 -14
- data/lib/mux_ruby/models/get_asset_or_live_stream_id_response.rb +218 -0
- data/lib/mux_ruby/models/get_asset_or_live_stream_id_response_data.rb +237 -0
- data/lib/mux_ruby/models/get_asset_or_live_stream_id_response_data_object.rb +264 -0
- data/lib/mux_ruby/models/get_asset_playback_id_response.rb +48 -14
- data/lib/mux_ruby/models/get_metric_timeseries_data_response.rb +50 -16
- data/lib/mux_ruby/models/get_overall_values_response.rb +50 -16
- data/lib/mux_ruby/models/get_real_time_breakdown_response.rb +50 -16
- data/lib/mux_ruby/models/get_real_time_histogram_timeseries_response.rb +51 -17
- data/lib/mux_ruby/models/get_real_time_histogram_timeseries_response_meta.rb +48 -14
- data/lib/mux_ruby/models/get_real_time_timeseries_response.rb +50 -16
- data/lib/mux_ruby/models/incident.rb +68 -34
- data/lib/mux_ruby/models/incident_breakdown.rb +50 -16
- data/lib/mux_ruby/models/incident_notification.rb +50 -16
- data/lib/mux_ruby/models/incident_notification_rule.rb +52 -18
- data/lib/mux_ruby/models/incident_response.rb +49 -15
- data/lib/mux_ruby/models/input_file.rb +49 -15
- data/lib/mux_ruby/models/input_info.rb +49 -15
- data/lib/mux_ruby/models/input_settings.rb +91 -30
- data/lib/mux_ruby/models/input_settings_overlay_settings.rb +68 -26
- data/lib/mux_ruby/models/input_track.rb +56 -22
- data/lib/mux_ruby/models/insight.rb +53 -19
- data/lib/mux_ruby/models/list_all_metric_values_response.rb +50 -16
- data/lib/mux_ruby/models/list_assets_response.rb +48 -14
- data/lib/mux_ruby/models/list_breakdown_values_response.rb +50 -16
- data/lib/mux_ruby/models/list_delivery_usage_response.rb +51 -17
- data/lib/mux_ruby/models/list_dimension_values_response.rb +50 -16
- data/lib/mux_ruby/models/list_dimensions_response.rb +50 -16
- data/lib/mux_ruby/models/list_errors_response.rb +50 -16
- data/lib/mux_ruby/models/list_exports_response.rb +50 -16
- data/lib/mux_ruby/models/list_filter_values_response.rb +50 -16
- data/lib/mux_ruby/models/list_filters_response.rb +50 -16
- data/lib/mux_ruby/models/list_filters_response_data.rb +49 -15
- data/lib/mux_ruby/models/list_incidents_response.rb +50 -16
- data/lib/mux_ruby/models/list_insights_response.rb +50 -16
- data/lib/mux_ruby/models/list_live_streams_response.rb +48 -14
- data/lib/mux_ruby/models/list_real_time_dimensions_response.rb +50 -16
- data/lib/mux_ruby/models/list_real_time_dimensions_response_data.rb +49 -15
- data/lib/mux_ruby/models/list_real_time_metrics_response.rb +50 -16
- data/lib/mux_ruby/models/list_related_incidents_response.rb +50 -16
- data/lib/mux_ruby/models/list_signing_keys_response.rb +48 -14
- data/lib/mux_ruby/models/list_uploads_response.rb +48 -14
- data/lib/mux_ruby/models/list_video_view_exports_response.rb +240 -0
- data/lib/mux_ruby/models/list_video_views_response.rb +50 -16
- data/lib/mux_ruby/models/live_stream.rb +121 -29
- data/lib/mux_ruby/models/live_stream_response.rb +48 -14
- data/lib/mux_ruby/models/metric.rb +52 -18
- data/lib/mux_ruby/models/notification_rule.rb +50 -16
- data/lib/mux_ruby/models/overall_values.rb +51 -17
- data/lib/mux_ruby/models/playback_id.rb +50 -15
- data/lib/mux_ruby/models/playback_policy.rb +12 -6
- data/lib/mux_ruby/models/real_time_breakdown_value.rb +52 -18
- data/lib/mux_ruby/models/real_time_histogram_timeseries_bucket.rb +50 -16
- data/lib/mux_ruby/models/real_time_histogram_timeseries_bucket_values.rb +49 -15
- data/lib/mux_ruby/models/real_time_histogram_timeseries_datapoint.rb +54 -20
- data/lib/mux_ruby/models/real_time_timeseries_datapoint.rb +50 -16
- data/lib/mux_ruby/models/score.rb +53 -19
- data/lib/mux_ruby/models/signal_live_stream_complete_response.rb +48 -14
- data/lib/mux_ruby/models/signing_key.rb +53 -16
- data/lib/mux_ruby/models/signing_key_response.rb +48 -14
- data/lib/mux_ruby/models/simulcast_target.rb +55 -21
- data/lib/mux_ruby/models/simulcast_target_response.rb +48 -14
- data/lib/mux_ruby/models/track.rb +92 -33
- data/lib/mux_ruby/models/update_asset_master_access_request.rb +51 -17
- data/lib/mux_ruby/models/update_asset_mp4_support_request.rb +51 -17
- data/lib/mux_ruby/models/upload.rb +62 -26
- data/lib/mux_ruby/models/upload_error.rb +51 -15
- data/lib/mux_ruby/models/upload_response.rb +48 -14
- data/lib/mux_ruby/models/video_view.rb +242 -136
- data/lib/mux_ruby/models/video_view_event.rb +51 -17
- data/lib/mux_ruby/models/video_view_response.rb +49 -15
- data/lib/mux_ruby/version.rb +10 -3
- data/mux_ruby.gemspec +15 -15
- data/spec/api/assets_api_spec.rb +2 -0
- data/spec/api/playback_id_api_spec.rb +40 -0
- data/spec/api_client_spec.rb +10 -3
- data/spec/configuration_spec.rb +9 -2
- data/spec/models/asset_master_spec.rb +4 -0
- data/spec/models/asset_spec.rb +10 -0
- data/spec/models/export_date_spec.rb +40 -0
- data/spec/models/export_file_spec.rb +46 -0
- data/spec/models/get_asset_or_live_stream_id_response_data_object_spec.rb +44 -0
- data/spec/models/get_asset_or_live_stream_id_response_data_spec.rb +46 -0
- data/spec/models/get_asset_or_live_stream_id_response_spec.rb +34 -0
- data/spec/models/input_settings_spec.rb +12 -0
- data/spec/models/list_video_view_exports_response_spec.rb +46 -0
- data/spec/models/track_spec.rb +4 -0
- data/spec/spec_helper.rb +9 -2
- metadata +161 -235
@@ -1,9 +1,16 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
3
|
-
|
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
|
+
|
4
11
|
=end
|
5
12
|
|
6
|
-
require '
|
13
|
+
require 'cgi'
|
7
14
|
|
8
15
|
module MuxRuby
|
9
16
|
class MetricsApi
|
@@ -13,12 +20,12 @@ module MuxRuby
|
|
13
20
|
@api_client = api_client
|
14
21
|
end
|
15
22
|
# Get metric timeseries data
|
16
|
-
# Returns timeseries data for a specific metric
|
17
|
-
# @param metric_id ID of the Metric
|
23
|
+
# Returns timeseries data for a specific metric.
|
24
|
+
# @param metric_id [String] ID of the Metric
|
18
25
|
# @param [Hash] opts the optional parameters
|
19
|
-
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
|
20
|
-
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US).
|
21
|
-
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the
|
26
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
27
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
28
|
+
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used.
|
22
29
|
# @option opts [String] :order_direction Sort order.
|
23
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 supplied timeframe.
|
24
31
|
# @return [GetMetricTimeseriesDataResponse]
|
@@ -28,15 +35,15 @@ module MuxRuby
|
|
28
35
|
end
|
29
36
|
|
30
37
|
# Get metric timeseries data
|
31
|
-
# Returns timeseries data for a specific metric
|
32
|
-
# @param metric_id ID of the Metric
|
38
|
+
# Returns timeseries data for a specific metric.
|
39
|
+
# @param metric_id [String] ID of the Metric
|
33
40
|
# @param [Hash] opts the optional parameters
|
34
|
-
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
|
35
|
-
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US).
|
36
|
-
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the
|
41
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
42
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
43
|
+
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used.
|
37
44
|
# @option opts [String] :order_direction Sort order.
|
38
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 supplied timeframe.
|
39
|
-
# @return [Array<(GetMetricTimeseriesDataResponse,
|
46
|
+
# @return [Array<(GetMetricTimeseriesDataResponse, Integer, Hash)>] GetMetricTimeseriesDataResponse data, response status code and response headers
|
40
47
|
def get_metric_timeseries_data_with_http_info(metric_id, opts = {})
|
41
48
|
if @api_client.config.debugging
|
42
49
|
@api_client.config.logger.debug 'Calling API: MetricsApi.get_metric_timeseries_data ...'
|
@@ -46,23 +53,27 @@ module MuxRuby
|
|
46
53
|
fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsApi.get_metric_timeseries_data"
|
47
54
|
end
|
48
55
|
# verify enum value
|
49
|
-
|
50
|
-
|
56
|
+
allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "max_downscale_percentage", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_failure_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate"]
|
57
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(metric_id)
|
58
|
+
fail ArgumentError, "invalid value for \"metric_id\", must be one of #{allowable_values}"
|
51
59
|
end
|
52
|
-
|
53
|
-
|
60
|
+
allowable_values = ["95th", "median", "avg", "count", "sum"]
|
61
|
+
if @api_client.config.client_side_validation && opts[:'measurement'] && !allowable_values.include?(opts[:'measurement'])
|
62
|
+
fail ArgumentError, "invalid value for \"measurement\", must be one of #{allowable_values}"
|
54
63
|
end
|
55
|
-
|
56
|
-
|
64
|
+
allowable_values = ["asc", "desc"]
|
65
|
+
if @api_client.config.client_side_validation && opts[:'order_direction'] && !allowable_values.include?(opts[:'order_direction'])
|
66
|
+
fail ArgumentError, "invalid value for \"order_direction\", must be one of #{allowable_values}"
|
57
67
|
end
|
58
|
-
|
59
|
-
|
68
|
+
allowable_values = ["hour", "day"]
|
69
|
+
if @api_client.config.client_side_validation && opts[:'group_by'] && !allowable_values.include?(opts[:'group_by'])
|
70
|
+
fail ArgumentError, "invalid value for \"group_by\", must be one of #{allowable_values}"
|
60
71
|
end
|
61
72
|
# resource path
|
62
|
-
local_var_path = '/data/v1/metrics/{METRIC_ID}/timeseries'.sub('{' + 'METRIC_ID' + '}', metric_id.to_s)
|
73
|
+
local_var_path = '/data/v1/metrics/{METRIC_ID}/timeseries'.sub('{' + 'METRIC_ID' + '}', CGI.escape(metric_id.to_s))
|
63
74
|
|
64
75
|
# query parameters
|
65
|
-
query_params = {}
|
76
|
+
query_params = opts[:query_params] || {}
|
66
77
|
query_params[:'timeframe[]'] = @api_client.build_collection_param(opts[:'timeframe'], :multi) if !opts[:'timeframe'].nil?
|
67
78
|
query_params[:'filters[]'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
|
68
79
|
query_params[:'measurement'] = opts[:'measurement'] if !opts[:'measurement'].nil?
|
@@ -70,23 +81,33 @@ module MuxRuby
|
|
70
81
|
query_params[:'group_by'] = opts[:'group_by'] if !opts[:'group_by'].nil?
|
71
82
|
|
72
83
|
# header parameters
|
73
|
-
header_params = {}
|
84
|
+
header_params = opts[:header_params] || {}
|
74
85
|
# HTTP header 'Accept' (if needed)
|
75
86
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
76
87
|
|
77
88
|
# form parameters
|
78
|
-
form_params = {}
|
89
|
+
form_params = opts[:form_params] || {}
|
79
90
|
|
80
91
|
# http body (model)
|
81
|
-
post_body =
|
82
|
-
|
83
|
-
|
92
|
+
post_body = opts[:debug_body]
|
93
|
+
|
94
|
+
# return_type
|
95
|
+
return_type = opts[:debug_return_type] || 'GetMetricTimeseriesDataResponse'
|
96
|
+
|
97
|
+
# auth_names
|
98
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
99
|
+
|
100
|
+
new_options = opts.merge(
|
101
|
+
:operation => :"MetricsApi.get_metric_timeseries_data",
|
84
102
|
:header_params => header_params,
|
85
103
|
:query_params => query_params,
|
86
104
|
:form_params => form_params,
|
87
105
|
:body => post_body,
|
88
106
|
:auth_names => auth_names,
|
89
|
-
:return_type =>
|
107
|
+
:return_type => return_type
|
108
|
+
)
|
109
|
+
|
110
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
90
111
|
if @api_client.config.debugging
|
91
112
|
@api_client.config.logger.debug "API called: MetricsApi#get_metric_timeseries_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
92
113
|
end
|
@@ -94,12 +115,12 @@ module MuxRuby
|
|
94
115
|
end
|
95
116
|
|
96
117
|
# Get Overall values
|
97
|
-
# Returns the overall value for a specific metric, as well as the total view count, watch time, and the Mux Global metric value for the metric.
|
98
|
-
# @param metric_id ID of the Metric
|
118
|
+
# Returns the overall value for a specific metric, as well as the total view count, watch time, and the Mux Global metric value for the metric.
|
119
|
+
# @param metric_id [String] ID of the Metric
|
99
120
|
# @param [Hash] opts the optional parameters
|
100
|
-
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
|
101
|
-
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US).
|
102
|
-
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the
|
121
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
122
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
123
|
+
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used.
|
103
124
|
# @return [GetOverallValuesResponse]
|
104
125
|
def get_overall_values(metric_id, opts = {})
|
105
126
|
data, _status_code, _headers = get_overall_values_with_http_info(metric_id, opts)
|
@@ -107,13 +128,13 @@ module MuxRuby
|
|
107
128
|
end
|
108
129
|
|
109
130
|
# Get Overall values
|
110
|
-
# Returns the overall value for a specific metric, as well as the total view count, watch time, and the Mux Global metric value for the metric.
|
111
|
-
# @param metric_id ID of the Metric
|
131
|
+
# Returns the overall value for a specific metric, as well as the total view count, watch time, and the Mux Global metric value for the metric.
|
132
|
+
# @param metric_id [String] ID of the Metric
|
112
133
|
# @param [Hash] opts the optional parameters
|
113
|
-
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
|
114
|
-
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US).
|
115
|
-
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the
|
116
|
-
# @return [Array<(GetOverallValuesResponse,
|
134
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
135
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
136
|
+
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used.
|
137
|
+
# @return [Array<(GetOverallValuesResponse, Integer, Hash)>] GetOverallValuesResponse data, response status code and response headers
|
117
138
|
def get_overall_values_with_http_info(metric_id, opts = {})
|
118
139
|
if @api_client.config.debugging
|
119
140
|
@api_client.config.logger.debug 'Calling API: MetricsApi.get_overall_values ...'
|
@@ -123,39 +144,51 @@ module MuxRuby
|
|
123
144
|
fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsApi.get_overall_values"
|
124
145
|
end
|
125
146
|
# verify enum value
|
126
|
-
|
127
|
-
|
147
|
+
allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "max_downscale_percentage", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_failure_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate"]
|
148
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(metric_id)
|
149
|
+
fail ArgumentError, "invalid value for \"metric_id\", must be one of #{allowable_values}"
|
128
150
|
end
|
129
|
-
|
130
|
-
|
151
|
+
allowable_values = ["95th", "median", "avg", "count", "sum"]
|
152
|
+
if @api_client.config.client_side_validation && opts[:'measurement'] && !allowable_values.include?(opts[:'measurement'])
|
153
|
+
fail ArgumentError, "invalid value for \"measurement\", must be one of #{allowable_values}"
|
131
154
|
end
|
132
155
|
# resource path
|
133
|
-
local_var_path = '/data/v1/metrics/{METRIC_ID}/overall'.sub('{' + 'METRIC_ID' + '}', metric_id.to_s)
|
156
|
+
local_var_path = '/data/v1/metrics/{METRIC_ID}/overall'.sub('{' + 'METRIC_ID' + '}', CGI.escape(metric_id.to_s))
|
134
157
|
|
135
158
|
# query parameters
|
136
|
-
query_params = {}
|
159
|
+
query_params = opts[:query_params] || {}
|
137
160
|
query_params[:'timeframe[]'] = @api_client.build_collection_param(opts[:'timeframe'], :multi) if !opts[:'timeframe'].nil?
|
138
161
|
query_params[:'filters[]'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
|
139
162
|
query_params[:'measurement'] = opts[:'measurement'] if !opts[:'measurement'].nil?
|
140
163
|
|
141
164
|
# header parameters
|
142
|
-
header_params = {}
|
165
|
+
header_params = opts[:header_params] || {}
|
143
166
|
# HTTP header 'Accept' (if needed)
|
144
167
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
145
168
|
|
146
169
|
# form parameters
|
147
|
-
form_params = {}
|
170
|
+
form_params = opts[:form_params] || {}
|
148
171
|
|
149
172
|
# http body (model)
|
150
|
-
post_body =
|
151
|
-
|
152
|
-
|
173
|
+
post_body = opts[:debug_body]
|
174
|
+
|
175
|
+
# return_type
|
176
|
+
return_type = opts[:debug_return_type] || 'GetOverallValuesResponse'
|
177
|
+
|
178
|
+
# auth_names
|
179
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
180
|
+
|
181
|
+
new_options = opts.merge(
|
182
|
+
:operation => :"MetricsApi.get_overall_values",
|
153
183
|
:header_params => header_params,
|
154
184
|
:query_params => query_params,
|
155
185
|
:form_params => form_params,
|
156
186
|
:body => post_body,
|
157
187
|
:auth_names => auth_names,
|
158
|
-
:return_type =>
|
188
|
+
:return_type => return_type
|
189
|
+
)
|
190
|
+
|
191
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
159
192
|
if @api_client.config.debugging
|
160
193
|
@api_client.config.logger.debug "API called: MetricsApi#get_overall_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
161
194
|
end
|
@@ -163,10 +196,10 @@ module MuxRuby
|
|
163
196
|
end
|
164
197
|
|
165
198
|
# List all metric values
|
166
|
-
# List all of the values across every breakdown for a specific metric
|
199
|
+
# List all of the values across every breakdown for a specific metric.
|
167
200
|
# @param [Hash] opts the optional parameters
|
168
|
-
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
|
169
|
-
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US).
|
201
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
202
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
170
203
|
# @option opts [String] :dimension Dimension the specified value belongs to
|
171
204
|
# @option opts [String] :value Value to show all available metrics for
|
172
205
|
# @return [ListAllMetricValuesResponse]
|
@@ -176,48 +209,59 @@ module MuxRuby
|
|
176
209
|
end
|
177
210
|
|
178
211
|
# List all metric values
|
179
|
-
# List all of the values across every breakdown for a specific metric
|
212
|
+
# List all of the values across every breakdown for a specific metric.
|
180
213
|
# @param [Hash] opts the optional parameters
|
181
|
-
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
|
182
|
-
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US).
|
214
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
215
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
183
216
|
# @option opts [String] :dimension Dimension the specified value belongs to
|
184
217
|
# @option opts [String] :value Value to show all available metrics for
|
185
|
-
# @return [Array<(ListAllMetricValuesResponse,
|
218
|
+
# @return [Array<(ListAllMetricValuesResponse, Integer, Hash)>] ListAllMetricValuesResponse data, response status code and response headers
|
186
219
|
def list_all_metric_values_with_http_info(opts = {})
|
187
220
|
if @api_client.config.debugging
|
188
221
|
@api_client.config.logger.debug 'Calling API: MetricsApi.list_all_metric_values ...'
|
189
222
|
end
|
190
|
-
|
191
|
-
|
223
|
+
allowable_values = ["asn", "browser", "browser_version", "cdn", "continent_code", "country", "exit_before_video_start", "experiment_name", "operating_system", "operating_system_version", "player_autoplay", "player_error_code", "player_mux_plugin_name", "player_mux_plugin_version", "player_name", "player_preload", "player_remote_played", "player_software", "player_software_version", "player_version", "preroll_ad_asset_hostname", "preroll_ad_tag_hostname", "preroll_played", "preroll_requested", "region", "source_hostname", "source_type", "stream_type", "sub_property_id", "video_encoding_variant", "video_id", "video_series", "video_title", "view_session_id", "viewer_connection_type", "viewer_device_category", "viewer_device_manufacturer", "viewer_device_model", "viewer_device_name", "viewer_user_id"]
|
224
|
+
if @api_client.config.client_side_validation && opts[:'dimension'] && !allowable_values.include?(opts[:'dimension'])
|
225
|
+
fail ArgumentError, "invalid value for \"dimension\", must be one of #{allowable_values}"
|
192
226
|
end
|
193
227
|
# resource path
|
194
228
|
local_var_path = '/data/v1/metrics/comparison'
|
195
229
|
|
196
230
|
# query parameters
|
197
|
-
query_params = {}
|
231
|
+
query_params = opts[:query_params] || {}
|
198
232
|
query_params[:'timeframe[]'] = @api_client.build_collection_param(opts[:'timeframe'], :multi) if !opts[:'timeframe'].nil?
|
199
233
|
query_params[:'filters[]'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
|
200
234
|
query_params[:'dimension'] = opts[:'dimension'] if !opts[:'dimension'].nil?
|
201
235
|
query_params[:'value'] = opts[:'value'] if !opts[:'value'].nil?
|
202
236
|
|
203
237
|
# header parameters
|
204
|
-
header_params = {}
|
238
|
+
header_params = opts[:header_params] || {}
|
205
239
|
# HTTP header 'Accept' (if needed)
|
206
240
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
207
241
|
|
208
242
|
# form parameters
|
209
|
-
form_params = {}
|
243
|
+
form_params = opts[:form_params] || {}
|
210
244
|
|
211
245
|
# http body (model)
|
212
|
-
post_body =
|
213
|
-
|
214
|
-
|
246
|
+
post_body = opts[:debug_body]
|
247
|
+
|
248
|
+
# return_type
|
249
|
+
return_type = opts[:debug_return_type] || 'ListAllMetricValuesResponse'
|
250
|
+
|
251
|
+
# auth_names
|
252
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
253
|
+
|
254
|
+
new_options = opts.merge(
|
255
|
+
:operation => :"MetricsApi.list_all_metric_values",
|
215
256
|
:header_params => header_params,
|
216
257
|
:query_params => query_params,
|
217
258
|
:form_params => form_params,
|
218
259
|
:body => post_body,
|
219
260
|
:auth_names => auth_names,
|
220
|
-
:return_type =>
|
261
|
+
:return_type => return_type
|
262
|
+
)
|
263
|
+
|
264
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
221
265
|
if @api_client.config.debugging
|
222
266
|
@api_client.config.logger.debug "API called: MetricsApi#list_all_metric_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
223
267
|
end
|
@@ -225,17 +269,17 @@ module MuxRuby
|
|
225
269
|
end
|
226
270
|
|
227
271
|
# List breakdown values
|
228
|
-
# List the breakdown values for a specific metric
|
229
|
-
# @param metric_id ID of the Metric
|
272
|
+
# List the breakdown values for a specific metric.
|
273
|
+
# @param metric_id [String] ID of the Metric
|
230
274
|
# @param [Hash] opts the optional parameters
|
231
275
|
# @option opts [String] :group_by Breakdown value to group the results by
|
232
|
-
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the
|
233
|
-
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US).
|
276
|
+
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used.
|
277
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
234
278
|
# @option opts [Integer] :limit Number of items to include in the response (default to 25)
|
235
279
|
# @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1)
|
236
280
|
# @option opts [String] :order_by Value to order the results by
|
237
281
|
# @option opts [String] :order_direction Sort order.
|
238
|
-
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
|
282
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
239
283
|
# @return [ListBreakdownValuesResponse]
|
240
284
|
def list_breakdown_values(metric_id, opts = {})
|
241
285
|
data, _status_code, _headers = list_breakdown_values_with_http_info(metric_id, opts)
|
@@ -243,18 +287,18 @@ module MuxRuby
|
|
243
287
|
end
|
244
288
|
|
245
289
|
# List breakdown values
|
246
|
-
# List the breakdown values for a specific metric
|
247
|
-
# @param metric_id ID of the Metric
|
290
|
+
# List the breakdown values for a specific metric.
|
291
|
+
# @param metric_id [String] ID of the Metric
|
248
292
|
# @param [Hash] opts the optional parameters
|
249
293
|
# @option opts [String] :group_by Breakdown value to group the results by
|
250
|
-
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the
|
251
|
-
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US).
|
294
|
+
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used.
|
295
|
+
# @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]=operating_system:windows&filters[]=country:US). Possible filter names are the same as returned by the List Filters endpoint.
|
252
296
|
# @option opts [Integer] :limit Number of items to include in the response
|
253
297
|
# @option opts [Integer] :page Offset by this many pages, of the size of `limit`
|
254
298
|
# @option opts [String] :order_by Value to order the results by
|
255
299
|
# @option opts [String] :order_direction Sort order.
|
256
|
-
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
|
257
|
-
# @return [Array<(ListBreakdownValuesResponse,
|
300
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
301
|
+
# @return [Array<(ListBreakdownValuesResponse, Integer, Hash)>] ListBreakdownValuesResponse data, response status code and response headers
|
258
302
|
def list_breakdown_values_with_http_info(metric_id, opts = {})
|
259
303
|
if @api_client.config.debugging
|
260
304
|
@api_client.config.logger.debug 'Calling API: MetricsApi.list_breakdown_values ...'
|
@@ -264,26 +308,31 @@ module MuxRuby
|
|
264
308
|
fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsApi.list_breakdown_values"
|
265
309
|
end
|
266
310
|
# verify enum value
|
267
|
-
|
268
|
-
|
311
|
+
allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "max_downscale_percentage", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_failure_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate"]
|
312
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(metric_id)
|
313
|
+
fail ArgumentError, "invalid value for \"metric_id\", must be one of #{allowable_values}"
|
269
314
|
end
|
270
|
-
|
271
|
-
|
315
|
+
allowable_values = ["asn", "browser", "browser_version", "cdn", "continent_code", "country", "exit_before_video_start", "experiment_name", "operating_system", "operating_system_version", "player_autoplay", "player_error_code", "player_mux_plugin_name", "player_mux_plugin_version", "player_name", "player_preload", "player_remote_played", "player_software", "player_software_version", "player_version", "preroll_ad_asset_hostname", "preroll_ad_tag_hostname", "preroll_played", "preroll_requested", "region", "source_hostname", "source_type", "stream_type", "sub_property_id", "video_encoding_variant", "video_id", "video_series", "video_title", "view_session_id", "viewer_connection_type", "viewer_device_category", "viewer_device_manufacturer", "viewer_device_model", "viewer_device_name", "viewer_user_id"]
|
316
|
+
if @api_client.config.client_side_validation && opts[:'group_by'] && !allowable_values.include?(opts[:'group_by'])
|
317
|
+
fail ArgumentError, "invalid value for \"group_by\", must be one of #{allowable_values}"
|
272
318
|
end
|
273
|
-
|
274
|
-
|
319
|
+
allowable_values = ["95th", "median", "avg", "count", "sum"]
|
320
|
+
if @api_client.config.client_side_validation && opts[:'measurement'] && !allowable_values.include?(opts[:'measurement'])
|
321
|
+
fail ArgumentError, "invalid value for \"measurement\", must be one of #{allowable_values}"
|
275
322
|
end
|
276
|
-
|
277
|
-
|
323
|
+
allowable_values = ["negative_impact", "value", "views", "field"]
|
324
|
+
if @api_client.config.client_side_validation && opts[:'order_by'] && !allowable_values.include?(opts[:'order_by'])
|
325
|
+
fail ArgumentError, "invalid value for \"order_by\", must be one of #{allowable_values}"
|
278
326
|
end
|
279
|
-
|
280
|
-
|
327
|
+
allowable_values = ["asc", "desc"]
|
328
|
+
if @api_client.config.client_side_validation && opts[:'order_direction'] && !allowable_values.include?(opts[:'order_direction'])
|
329
|
+
fail ArgumentError, "invalid value for \"order_direction\", must be one of #{allowable_values}"
|
281
330
|
end
|
282
331
|
# resource path
|
283
|
-
local_var_path = '/data/v1/metrics/{METRIC_ID}/breakdown'.sub('{' + 'METRIC_ID' + '}', metric_id.to_s)
|
332
|
+
local_var_path = '/data/v1/metrics/{METRIC_ID}/breakdown'.sub('{' + 'METRIC_ID' + '}', CGI.escape(metric_id.to_s))
|
284
333
|
|
285
334
|
# query parameters
|
286
|
-
query_params = {}
|
335
|
+
query_params = opts[:query_params] || {}
|
287
336
|
query_params[:'group_by'] = opts[:'group_by'] if !opts[:'group_by'].nil?
|
288
337
|
query_params[:'measurement'] = opts[:'measurement'] if !opts[:'measurement'].nil?
|
289
338
|
query_params[:'filters[]'] = @api_client.build_collection_param(opts[:'filters'], :multi) if !opts[:'filters'].nil?
|
@@ -294,23 +343,33 @@ module MuxRuby
|
|
294
343
|
query_params[:'timeframe[]'] = @api_client.build_collection_param(opts[:'timeframe'], :multi) if !opts[:'timeframe'].nil?
|
295
344
|
|
296
345
|
# header parameters
|
297
|
-
header_params = {}
|
346
|
+
header_params = opts[:header_params] || {}
|
298
347
|
# HTTP header 'Accept' (if needed)
|
299
348
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
300
349
|
|
301
350
|
# form parameters
|
302
|
-
form_params = {}
|
351
|
+
form_params = opts[:form_params] || {}
|
303
352
|
|
304
353
|
# http body (model)
|
305
|
-
post_body =
|
306
|
-
|
307
|
-
|
354
|
+
post_body = opts[:debug_body]
|
355
|
+
|
356
|
+
# return_type
|
357
|
+
return_type = opts[:debug_return_type] || 'ListBreakdownValuesResponse'
|
358
|
+
|
359
|
+
# auth_names
|
360
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
361
|
+
|
362
|
+
new_options = opts.merge(
|
363
|
+
:operation => :"MetricsApi.list_breakdown_values",
|
308
364
|
:header_params => header_params,
|
309
365
|
:query_params => query_params,
|
310
366
|
:form_params => form_params,
|
311
367
|
:body => post_body,
|
312
368
|
:auth_names => auth_names,
|
313
|
-
:return_type =>
|
369
|
+
:return_type => return_type
|
370
|
+
)
|
371
|
+
|
372
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
314
373
|
if @api_client.config.debugging
|
315
374
|
@api_client.config.logger.debug "API called: MetricsApi#list_breakdown_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
316
375
|
end
|
@@ -318,12 +377,12 @@ module MuxRuby
|
|
318
377
|
end
|
319
378
|
|
320
379
|
# List Insights
|
321
|
-
# Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric.
|
322
|
-
# @param metric_id ID of the Metric
|
380
|
+
# Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric.
|
381
|
+
# @param metric_id [String] ID of the Metric
|
323
382
|
# @param [Hash] opts the optional parameters
|
324
|
-
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the
|
383
|
+
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used.
|
325
384
|
# @option opts [String] :order_direction Sort order.
|
326
|
-
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
|
385
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
327
386
|
# @return [ListInsightsResponse]
|
328
387
|
def list_insights(metric_id, opts = {})
|
329
388
|
data, _status_code, _headers = list_insights_with_http_info(metric_id, opts)
|
@@ -331,13 +390,13 @@ module MuxRuby
|
|
331
390
|
end
|
332
391
|
|
333
392
|
# List Insights
|
334
|
-
# Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric.
|
335
|
-
# @param metric_id ID of the Metric
|
393
|
+
# Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric.
|
394
|
+
# @param metric_id [String] ID of the Metric
|
336
395
|
# @param [Hash] opts the optional parameters
|
337
|
-
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the
|
396
|
+
# @option opts [String] :measurement Measurement for the provided metric. If omitted, the default for the metric will be used.
|
338
397
|
# @option opts [String] :order_direction Sort order.
|
339
|
-
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600
|
340
|
-
# @return [Array<(ListInsightsResponse,
|
398
|
+
# @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. timeframe[]=1498867200&timeframe[]=1498953600 * duration string e.g. timeframe[]=24:hours or timeframe[]=7:days.
|
399
|
+
# @return [Array<(ListInsightsResponse, Integer, Hash)>] ListInsightsResponse data, response status code and response headers
|
341
400
|
def list_insights_with_http_info(metric_id, opts = {})
|
342
401
|
if @api_client.config.debugging
|
343
402
|
@api_client.config.logger.debug 'Calling API: MetricsApi.list_insights ...'
|
@@ -347,47 +406,59 @@ module MuxRuby
|
|
347
406
|
fail ArgumentError, "Missing the required parameter 'metric_id' when calling MetricsApi.list_insights"
|
348
407
|
end
|
349
408
|
# verify enum value
|
350
|
-
|
351
|
-
|
409
|
+
allowable_values = ["aggregate_startup_time", "downscale_percentage", "exits_before_video_start", "max_downscale_percentage", "max_upscale_percentage", "page_load_time", "playback_failure_percentage", "playback_failure_score", "player_startup_time", "playing_time", "rebuffer_count", "rebuffer_duration", "rebuffer_frequency", "rebuffer_percentage", "rebuffer_score", "requests_for_first_preroll", "seek_latency", "startup_time_score", "unique_viewers", "upscale_percentage", "video_quality_score", "video_startup_preroll_load_time", "video_startup_preroll_request_time", "video_startup_time", "viewer_experience_score", "views", "weighted_average_bitrate"]
|
410
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(metric_id)
|
411
|
+
fail ArgumentError, "invalid value for \"metric_id\", must be one of #{allowable_values}"
|
352
412
|
end
|
353
|
-
|
354
|
-
|
413
|
+
allowable_values = ["95th", "median", "avg", "count", "sum"]
|
414
|
+
if @api_client.config.client_side_validation && opts[:'measurement'] && !allowable_values.include?(opts[:'measurement'])
|
415
|
+
fail ArgumentError, "invalid value for \"measurement\", must be one of #{allowable_values}"
|
355
416
|
end
|
356
|
-
|
357
|
-
|
417
|
+
allowable_values = ["asc", "desc"]
|
418
|
+
if @api_client.config.client_side_validation && opts[:'order_direction'] && !allowable_values.include?(opts[:'order_direction'])
|
419
|
+
fail ArgumentError, "invalid value for \"order_direction\", must be one of #{allowable_values}"
|
358
420
|
end
|
359
421
|
# resource path
|
360
|
-
local_var_path = '/data/v1/metrics/{METRIC_ID}/insights'.sub('{' + 'METRIC_ID' + '}', metric_id.to_s)
|
422
|
+
local_var_path = '/data/v1/metrics/{METRIC_ID}/insights'.sub('{' + 'METRIC_ID' + '}', CGI.escape(metric_id.to_s))
|
361
423
|
|
362
424
|
# query parameters
|
363
|
-
query_params = {}
|
425
|
+
query_params = opts[:query_params] || {}
|
364
426
|
query_params[:'measurement'] = opts[:'measurement'] if !opts[:'measurement'].nil?
|
365
427
|
query_params[:'order_direction'] = opts[:'order_direction'] if !opts[:'order_direction'].nil?
|
366
428
|
query_params[:'timeframe[]'] = @api_client.build_collection_param(opts[:'timeframe'], :multi) if !opts[:'timeframe'].nil?
|
367
429
|
|
368
430
|
# header parameters
|
369
|
-
header_params = {}
|
431
|
+
header_params = opts[:header_params] || {}
|
370
432
|
# HTTP header 'Accept' (if needed)
|
371
433
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
372
434
|
|
373
435
|
# form parameters
|
374
|
-
form_params = {}
|
436
|
+
form_params = opts[:form_params] || {}
|
375
437
|
|
376
438
|
# http body (model)
|
377
|
-
post_body =
|
378
|
-
|
379
|
-
|
439
|
+
post_body = opts[:debug_body]
|
440
|
+
|
441
|
+
# return_type
|
442
|
+
return_type = opts[:debug_return_type] || 'ListInsightsResponse'
|
443
|
+
|
444
|
+
# auth_names
|
445
|
+
auth_names = opts[:debug_auth_names] || ['accessToken']
|
446
|
+
|
447
|
+
new_options = opts.merge(
|
448
|
+
:operation => :"MetricsApi.list_insights",
|
380
449
|
:header_params => header_params,
|
381
450
|
:query_params => query_params,
|
382
451
|
:form_params => form_params,
|
383
452
|
:body => post_body,
|
384
453
|
:auth_names => auth_names,
|
385
|
-
:return_type =>
|
454
|
+
:return_type => return_type
|
455
|
+
)
|
456
|
+
|
457
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
386
458
|
if @api_client.config.debugging
|
387
459
|
@api_client.config.logger.debug "API called: MetricsApi#list_insights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
388
460
|
end
|
389
461
|
return data, status_code, headers
|
390
462
|
end
|
391
|
-
|
392
463
|
end
|
393
464
|
end
|