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.
Files changed (288) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -1
  3. data/Gemfile.lock +26 -37
  4. data/README.md +37 -13
  5. data/docs/AbridgedVideoView.md +33 -13
  6. data/docs/Asset.md +59 -25
  7. data/docs/AssetErrors.md +15 -4
  8. data/docs/AssetMaster.md +15 -4
  9. data/docs/AssetNonStandardInputReasons.md +29 -11
  10. data/docs/AssetRecordingTimes.md +15 -4
  11. data/docs/AssetResponse.md +13 -3
  12. data/docs/AssetStaticRenditions.md +15 -4
  13. data/docs/AssetStaticRenditionsFiles.md +23 -8
  14. data/docs/AssetsApi.md +396 -161
  15. data/docs/BreakdownValue.md +21 -7
  16. data/docs/CreateAssetRequest.md +27 -10
  17. data/docs/CreateLiveStreamRequest.md +27 -9
  18. data/docs/CreatePlaybackIDRequest.md +13 -3
  19. data/docs/CreatePlaybackIDResponse.md +13 -3
  20. data/docs/CreateSimulcastTargetRequest.md +17 -5
  21. data/docs/CreateTrackRequest.md +25 -9
  22. data/docs/CreateTrackResponse.md +13 -3
  23. data/docs/CreateUploadRequest.md +19 -6
  24. data/docs/DeliveryReport.md +27 -9
  25. data/docs/DeliveryUsageApi.md +41 -23
  26. data/docs/DimensionValue.md +15 -4
  27. data/docs/DimensionsApi.md +72 -34
  28. data/docs/DirectUploadsApi.md +131 -56
  29. data/docs/DisableLiveStreamResponse.md +13 -3
  30. data/docs/EnableLiveStreamResponse.md +13 -3
  31. data/docs/Error.md +27 -10
  32. data/docs/ErrorsApi.md +38 -20
  33. data/docs/ExportDate.md +20 -0
  34. data/docs/ExportFile.md +22 -0
  35. data/docs/ExportsApi.md +99 -12
  36. data/docs/FilterValue.md +15 -4
  37. data/docs/FiltersApi.md +71 -33
  38. data/docs/GetAssetInputInfoResponse.md +13 -3
  39. data/docs/GetAssetOrLiveStreamIdResponse.md +18 -0
  40. data/docs/GetAssetOrLiveStreamIdResponseData.md +22 -0
  41. data/docs/GetAssetOrLiveStreamIdResponseDataObject.md +20 -0
  42. data/docs/GetAssetPlaybackIDResponse.md +13 -3
  43. data/docs/GetMetricTimeseriesDataResponse.md +17 -5
  44. data/docs/GetOverallValuesResponse.md +17 -5
  45. data/docs/GetRealTimeBreakdownResponse.md +17 -5
  46. data/docs/GetRealTimeHistogramTimeseriesResponse.md +19 -6
  47. data/docs/GetRealTimeHistogramTimeseriesResponseMeta.md +13 -3
  48. data/docs/GetRealTimeTimeseriesResponse.md +17 -5
  49. data/docs/Incident.md +53 -23
  50. data/docs/IncidentBreakdown.md +17 -5
  51. data/docs/IncidentNotification.md +17 -5
  52. data/docs/IncidentNotificationRule.md +21 -7
  53. data/docs/IncidentResponse.md +15 -4
  54. data/docs/IncidentsApi.md +118 -62
  55. data/docs/InputFile.md +15 -4
  56. data/docs/InputInfo.md +15 -4
  57. data/docs/InputSettings.md +31 -10
  58. data/docs/InputSettingsOverlaySettings.md +25 -9
  59. data/docs/InputTrack.md +29 -11
  60. data/docs/Insight.md +23 -8
  61. data/docs/ListAllMetricValuesResponse.md +17 -5
  62. data/docs/ListAssetsResponse.md +13 -3
  63. data/docs/ListBreakdownValuesResponse.md +17 -5
  64. data/docs/ListDeliveryUsageResponse.md +19 -6
  65. data/docs/ListDimensionValuesResponse.md +17 -5
  66. data/docs/ListDimensionsResponse.md +17 -5
  67. data/docs/ListErrorsResponse.md +17 -5
  68. data/docs/ListExportsResponse.md +17 -5
  69. data/docs/ListFilterValuesResponse.md +17 -5
  70. data/docs/ListFiltersResponse.md +17 -5
  71. data/docs/ListFiltersResponseData.md +15 -4
  72. data/docs/ListIncidentsResponse.md +17 -5
  73. data/docs/ListInsightsResponse.md +17 -5
  74. data/docs/ListLiveStreamsResponse.md +13 -3
  75. data/docs/ListRealTimeDimensionsResponse.md +17 -5
  76. data/docs/ListRealTimeDimensionsResponseData.md +15 -4
  77. data/docs/ListRealTimeMetricsResponse.md +17 -5
  78. data/docs/ListRelatedIncidentsResponse.md +17 -5
  79. data/docs/ListSigningKeysResponse.md +13 -3
  80. data/docs/ListUploadsResponse.md +13 -3
  81. data/docs/ListVideoViewExportsResponse.md +22 -0
  82. data/docs/ListVideoViewsResponse.md +17 -5
  83. data/docs/LiveStream.md +39 -15
  84. data/docs/LiveStreamResponse.md +13 -3
  85. data/docs/LiveStreamsApi.md +418 -170
  86. data/docs/Metric.md +21 -7
  87. data/docs/MetricsApi.md +211 -117
  88. data/docs/NotificationRule.md +17 -5
  89. data/docs/OverallValues.md +19 -6
  90. data/docs/PlaybackID.md +15 -4
  91. data/docs/PlaybackIDApi.md +78 -0
  92. data/docs/PlaybackPolicy.md +10 -2
  93. data/docs/RealTimeApi.md +177 -81
  94. data/docs/RealTimeBreakdownValue.md +21 -7
  95. data/docs/RealTimeHistogramTimeseriesBucket.md +15 -4
  96. data/docs/RealTimeHistogramTimeseriesBucketValues.md +15 -4
  97. data/docs/RealTimeHistogramTimeseriesDatapoint.md +25 -9
  98. data/docs/RealTimeTimeseriesDatapoint.md +17 -5
  99. data/docs/Score.md +23 -8
  100. data/docs/SignalLiveStreamCompleteResponse.md +13 -3
  101. data/docs/SigningKey.md +17 -5
  102. data/docs/SigningKeyResponse.md +13 -3
  103. data/docs/SimulcastTarget.md +21 -7
  104. data/docs/SimulcastTargetResponse.md +13 -3
  105. data/docs/Track.md +37 -15
  106. data/docs/URLSigningKeysApi.md +130 -54
  107. data/docs/UpdateAssetMP4SupportRequest.md +13 -3
  108. data/docs/UpdateAssetMasterAccessRequest.md +13 -3
  109. data/docs/Upload.md +29 -11
  110. data/docs/UploadError.md +15 -4
  111. data/docs/UploadResponse.md +13 -3
  112. data/docs/VideoView.md +251 -114
  113. data/docs/VideoViewEvent.md +19 -6
  114. data/docs/VideoViewResponse.md +15 -4
  115. data/docs/VideoViewsApi.md +78 -41
  116. data/examples/video/exercise-assets.rb +21 -0
  117. data/examples/video/exercise-live-streams.rb +8 -0
  118. data/gen/.gitignore +7 -0
  119. data/gen/Makefile +31 -0
  120. data/gen/generator-config.json +11 -0
  121. data/gen/openapitools.json +7 -0
  122. data/gen/package.json +17 -0
  123. data/gen/templates/Gemfile.mustache +11 -0
  124. data/gen/templates/README.mustache +158 -0
  125. data/gen/templates/Rakefile.mustache +10 -0
  126. data/gen/templates/api.mustache +206 -0
  127. data/gen/templates/api_client.mustache +264 -0
  128. data/gen/templates/api_client_faraday_partial.mustache +138 -0
  129. data/gen/templates/api_client_spec.mustache +220 -0
  130. data/gen/templates/api_client_typhoeus_partial.mustache +183 -0
  131. data/gen/templates/api_doc.mustache +118 -0
  132. data/gen/templates/api_error.mustache +67 -0
  133. data/gen/templates/api_info.mustache +12 -0
  134. data/gen/templates/api_test.mustache +47 -0
  135. data/gen/templates/base_object.mustache +120 -0
  136. data/gen/templates/configuration.mustache +349 -0
  137. data/gen/templates/configuration_spec.mustache +34 -0
  138. data/gen/templates/configuration_tls_faraday_partial.mustache +29 -0
  139. data/gen/templates/configuration_tls_typhoeus_partial.mustache +34 -0
  140. data/gen/templates/gem.mustache +40 -0
  141. data/gen/templates/gemspec.mustache +35 -0
  142. data/gen/templates/gitignore.mustache +39 -0
  143. data/gen/templates/model.mustache +26 -0
  144. data/gen/templates/model_doc.mustache +12 -0
  145. data/gen/templates/model_test.mustache +77 -0
  146. data/gen/templates/partial_model_enum_class.mustache +20 -0
  147. data/gen/templates/partial_model_generic.mustache +371 -0
  148. data/gen/templates/partial_model_generic_doc.mustache +28 -0
  149. data/gen/templates/partial_oneof_module.mustache +137 -0
  150. data/gen/templates/partial_oneof_module_doc.mustache +92 -0
  151. data/gen/templates/rspec.mustache +2 -0
  152. data/gen/templates/rubocop.mustache +148 -0
  153. data/gen/templates/spec_helper.mustache +103 -0
  154. data/gen/templates/version.mustache +7 -0
  155. data/gen/yarn.lock +1878 -0
  156. data/lib/mux_ruby.rb +16 -2
  157. data/lib/mux_ruby/api/assets_api.rb +291 -152
  158. data/lib/mux_ruby/api/delivery_usage_api.rb +32 -16
  159. data/lib/mux_ruby/api/dimensions_api.rb +55 -29
  160. data/lib/mux_ruby/api/direct_uploads_api.rb +90 -44
  161. data/lib/mux_ruby/api/errors_api.rb +34 -18
  162. data/lib/mux_ruby/api/exports_api.rb +86 -13
  163. data/lib/mux_ruby/api/filters_api.rb +53 -27
  164. data/lib/mux_ruby/api/incidents_api.rb +94 -52
  165. data/lib/mux_ruby/api/live_streams_api.rb +299 -157
  166. data/lib/mux_ruby/api/metrics_api.rb +193 -122
  167. data/lib/mux_ruby/api/playback_id_api.rb +85 -0
  168. data/lib/mux_ruby/api/real_time_api.rb +149 -87
  169. data/lib/mux_ruby/api/url_signing_keys_api.rb +95 -48
  170. data/lib/mux_ruby/api/video_views_api.rb +60 -33
  171. data/lib/mux_ruby/api_client.rb +106 -91
  172. data/lib/mux_ruby/api_error.rb +35 -7
  173. data/lib/mux_ruby/configuration.rb +50 -14
  174. data/lib/mux_ruby/models/abridged_video_view.rb +58 -24
  175. data/lib/mux_ruby/models/asset.rb +129 -58
  176. data/lib/mux_ruby/models/asset_errors.rb +52 -15
  177. data/lib/mux_ruby/models/asset_master.rb +85 -15
  178. data/lib/mux_ruby/models/asset_non_standard_input_reasons.rb +78 -43
  179. data/lib/mux_ruby/models/asset_recording_times.rb +52 -18
  180. data/lib/mux_ruby/models/asset_response.rb +48 -14
  181. data/lib/mux_ruby/models/asset_static_renditions.rb +55 -19
  182. data/lib/mux_ruby/models/asset_static_renditions_files.rb +60 -25
  183. data/lib/mux_ruby/models/breakdown_value.rb +52 -18
  184. data/lib/mux_ruby/models/create_asset_request.rb +70 -30
  185. data/lib/mux_ruby/models/create_live_stream_request.rb +68 -23
  186. data/lib/mux_ruby/models/create_playback_id_request.rb +48 -14
  187. data/lib/mux_ruby/models/create_playback_id_response.rb +48 -14
  188. data/lib/mux_ruby/models/create_simulcast_target_request.rb +50 -16
  189. data/lib/mux_ruby/models/create_track_request.rb +65 -27
  190. data/lib/mux_ruby/models/create_track_response.rb +48 -14
  191. data/lib/mux_ruby/models/create_upload_request.rb +52 -18
  192. data/lib/mux_ruby/models/delivery_report.rb +106 -21
  193. data/lib/mux_ruby/models/dimension_value.rb +49 -15
  194. data/lib/mux_ruby/models/disable_live_stream_response.rb +48 -14
  195. data/lib/mux_ruby/models/enable_live_stream_response.rb +48 -14
  196. data/lib/mux_ruby/models/error.rb +63 -21
  197. data/lib/mux_ruby/models/export_date.rb +229 -0
  198. data/lib/mux_ruby/models/export_file.rb +236 -0
  199. data/lib/mux_ruby/models/filter_value.rb +49 -15
  200. data/lib/mux_ruby/models/get_asset_input_info_response.rb +48 -14
  201. data/lib/mux_ruby/models/get_asset_or_live_stream_id_response.rb +218 -0
  202. data/lib/mux_ruby/models/get_asset_or_live_stream_id_response_data.rb +237 -0
  203. data/lib/mux_ruby/models/get_asset_or_live_stream_id_response_data_object.rb +264 -0
  204. data/lib/mux_ruby/models/get_asset_playback_id_response.rb +48 -14
  205. data/lib/mux_ruby/models/get_metric_timeseries_data_response.rb +50 -16
  206. data/lib/mux_ruby/models/get_overall_values_response.rb +50 -16
  207. data/lib/mux_ruby/models/get_real_time_breakdown_response.rb +50 -16
  208. data/lib/mux_ruby/models/get_real_time_histogram_timeseries_response.rb +51 -17
  209. data/lib/mux_ruby/models/get_real_time_histogram_timeseries_response_meta.rb +48 -14
  210. data/lib/mux_ruby/models/get_real_time_timeseries_response.rb +50 -16
  211. data/lib/mux_ruby/models/incident.rb +68 -34
  212. data/lib/mux_ruby/models/incident_breakdown.rb +50 -16
  213. data/lib/mux_ruby/models/incident_notification.rb +50 -16
  214. data/lib/mux_ruby/models/incident_notification_rule.rb +52 -18
  215. data/lib/mux_ruby/models/incident_response.rb +49 -15
  216. data/lib/mux_ruby/models/input_file.rb +49 -15
  217. data/lib/mux_ruby/models/input_info.rb +49 -15
  218. data/lib/mux_ruby/models/input_settings.rb +91 -30
  219. data/lib/mux_ruby/models/input_settings_overlay_settings.rb +68 -26
  220. data/lib/mux_ruby/models/input_track.rb +56 -22
  221. data/lib/mux_ruby/models/insight.rb +53 -19
  222. data/lib/mux_ruby/models/list_all_metric_values_response.rb +50 -16
  223. data/lib/mux_ruby/models/list_assets_response.rb +48 -14
  224. data/lib/mux_ruby/models/list_breakdown_values_response.rb +50 -16
  225. data/lib/mux_ruby/models/list_delivery_usage_response.rb +51 -17
  226. data/lib/mux_ruby/models/list_dimension_values_response.rb +50 -16
  227. data/lib/mux_ruby/models/list_dimensions_response.rb +50 -16
  228. data/lib/mux_ruby/models/list_errors_response.rb +50 -16
  229. data/lib/mux_ruby/models/list_exports_response.rb +50 -16
  230. data/lib/mux_ruby/models/list_filter_values_response.rb +50 -16
  231. data/lib/mux_ruby/models/list_filters_response.rb +50 -16
  232. data/lib/mux_ruby/models/list_filters_response_data.rb +49 -15
  233. data/lib/mux_ruby/models/list_incidents_response.rb +50 -16
  234. data/lib/mux_ruby/models/list_insights_response.rb +50 -16
  235. data/lib/mux_ruby/models/list_live_streams_response.rb +48 -14
  236. data/lib/mux_ruby/models/list_real_time_dimensions_response.rb +50 -16
  237. data/lib/mux_ruby/models/list_real_time_dimensions_response_data.rb +49 -15
  238. data/lib/mux_ruby/models/list_real_time_metrics_response.rb +50 -16
  239. data/lib/mux_ruby/models/list_related_incidents_response.rb +50 -16
  240. data/lib/mux_ruby/models/list_signing_keys_response.rb +48 -14
  241. data/lib/mux_ruby/models/list_uploads_response.rb +48 -14
  242. data/lib/mux_ruby/models/list_video_view_exports_response.rb +240 -0
  243. data/lib/mux_ruby/models/list_video_views_response.rb +50 -16
  244. data/lib/mux_ruby/models/live_stream.rb +121 -29
  245. data/lib/mux_ruby/models/live_stream_response.rb +48 -14
  246. data/lib/mux_ruby/models/metric.rb +52 -18
  247. data/lib/mux_ruby/models/notification_rule.rb +50 -16
  248. data/lib/mux_ruby/models/overall_values.rb +51 -17
  249. data/lib/mux_ruby/models/playback_id.rb +50 -15
  250. data/lib/mux_ruby/models/playback_policy.rb +12 -6
  251. data/lib/mux_ruby/models/real_time_breakdown_value.rb +52 -18
  252. data/lib/mux_ruby/models/real_time_histogram_timeseries_bucket.rb +50 -16
  253. data/lib/mux_ruby/models/real_time_histogram_timeseries_bucket_values.rb +49 -15
  254. data/lib/mux_ruby/models/real_time_histogram_timeseries_datapoint.rb +54 -20
  255. data/lib/mux_ruby/models/real_time_timeseries_datapoint.rb +50 -16
  256. data/lib/mux_ruby/models/score.rb +53 -19
  257. data/lib/mux_ruby/models/signal_live_stream_complete_response.rb +48 -14
  258. data/lib/mux_ruby/models/signing_key.rb +53 -16
  259. data/lib/mux_ruby/models/signing_key_response.rb +48 -14
  260. data/lib/mux_ruby/models/simulcast_target.rb +55 -21
  261. data/lib/mux_ruby/models/simulcast_target_response.rb +48 -14
  262. data/lib/mux_ruby/models/track.rb +92 -33
  263. data/lib/mux_ruby/models/update_asset_master_access_request.rb +51 -17
  264. data/lib/mux_ruby/models/update_asset_mp4_support_request.rb +51 -17
  265. data/lib/mux_ruby/models/upload.rb +62 -26
  266. data/lib/mux_ruby/models/upload_error.rb +51 -15
  267. data/lib/mux_ruby/models/upload_response.rb +48 -14
  268. data/lib/mux_ruby/models/video_view.rb +242 -136
  269. data/lib/mux_ruby/models/video_view_event.rb +51 -17
  270. data/lib/mux_ruby/models/video_view_response.rb +49 -15
  271. data/lib/mux_ruby/version.rb +10 -3
  272. data/mux_ruby.gemspec +15 -15
  273. data/spec/api/assets_api_spec.rb +2 -0
  274. data/spec/api/playback_id_api_spec.rb +40 -0
  275. data/spec/api_client_spec.rb +10 -3
  276. data/spec/configuration_spec.rb +9 -2
  277. data/spec/models/asset_master_spec.rb +4 -0
  278. data/spec/models/asset_spec.rb +10 -0
  279. data/spec/models/export_date_spec.rb +40 -0
  280. data/spec/models/export_file_spec.rb +46 -0
  281. data/spec/models/get_asset_or_live_stream_id_response_data_object_spec.rb +44 -0
  282. data/spec/models/get_asset_or_live_stream_id_response_data_spec.rb +46 -0
  283. data/spec/models/get_asset_or_live_stream_id_response_spec.rb +34 -0
  284. data/spec/models/input_settings_spec.rb +12 -0
  285. data/spec/models/list_video_view_exports_response_spec.rb +46 -0
  286. data/spec/models/track_spec.rb +4 -0
  287. data/spec/spec_helper.rb +9 -2
  288. metadata +161 -235
@@ -1,9 +1,16 @@
1
1
  =begin
2
- # Mux Ruby - Copyright 2019 Mux Inc.
3
- # NOTE: This file is auto generated. Do not edit this file manually.
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 'uri'
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[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
20
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
21
- # @option opts [String] :measurement Measurement for the provided metric. If omitted, the deafult for the metric will be used.
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. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
27
+ # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
28
+ # @option opts [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[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
35
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
36
- # @option opts [String] :measurement Measurement for the provided metric. If omitted, the deafult for the metric will be used.
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. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
42
+ # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
43
+ # @option opts [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, Fixnum, Hash)>] GetMetricTimeseriesDataResponse data, response status code and response headers
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
- if @api_client.config.client_side_validation && !['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', 'rebuffer_count', 'rebuffer_duration', 'rebuffer_frequency', 'rebuffer_percentage', 'rebuffer_score', 'requests_for_first_preroll', 'seek_latency', 'startup_time_score', 'upscale_percentage', 'video_quality_score', 'video_startup_preroll_load_time', 'video_startup_preroll_request_time', 'video_startup_time', 'viewer_experience_score'].include?(metric_id)
50
- fail ArgumentError, "invalid value for 'metric_id', must be one of 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, rebuffer_count, rebuffer_duration, rebuffer_frequency, rebuffer_percentage, rebuffer_score, requests_for_first_preroll, seek_latency, startup_time_score, upscale_percentage, video_quality_score, video_startup_preroll_load_time, video_startup_preroll_request_time, video_startup_time, viewer_experience_score"
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
- if @api_client.config.client_side_validation && opts[:'measurement'] && !['95th', 'median', 'avg'].include?(opts[:'measurement'])
53
- fail ArgumentError, 'invalid value for "measurement", must be one of 95th, median, avg'
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
- if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction'])
56
- fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc'
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
- if @api_client.config.client_side_validation && opts[:'group_by'] && !['hour', 'day'].include?(opts[:'group_by'])
59
- fail ArgumentError, 'invalid value for "group_by", must be one of hour, day'
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 = nil
82
- auth_names = ['accessToken']
83
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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 => 'GetMetricTimeseriesDataResponse')
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[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
101
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
102
- # @option opts [String] :measurement Measurement for the provided metric. If omitted, the deafult for the metric will be used.
121
+ # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
122
+ # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
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[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
114
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
115
- # @option opts [String] :measurement Measurement for the provided metric. If omitted, the deafult for the metric will be used.
116
- # @return [Array<(GetOverallValuesResponse, Fixnum, Hash)>] GetOverallValuesResponse data, response status code and response headers
134
+ # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
135
+ # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
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
- if @api_client.config.client_side_validation && !['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', 'rebuffer_count', 'rebuffer_duration', 'rebuffer_frequency', 'rebuffer_percentage', 'rebuffer_score', 'requests_for_first_preroll', 'seek_latency', 'startup_time_score', 'upscale_percentage', 'video_quality_score', 'video_startup_preroll_load_time', 'video_startup_preroll_request_time', 'video_startup_time', 'viewer_experience_score'].include?(metric_id)
127
- fail ArgumentError, "invalid value for 'metric_id', must be one of 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, rebuffer_count, rebuffer_duration, rebuffer_frequency, rebuffer_percentage, rebuffer_score, requests_for_first_preroll, seek_latency, startup_time_score, upscale_percentage, video_quality_score, video_startup_preroll_load_time, video_startup_preroll_request_time, video_startup_time, viewer_experience_score"
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
- if @api_client.config.client_side_validation && opts[:'measurement'] && !['95th', 'median', 'avg'].include?(opts[:'measurement'])
130
- fail ArgumentError, 'invalid value for "measurement", must be one of 95th, median, avg'
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 = nil
151
- auth_names = ['accessToken']
152
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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 => 'GetOverallValuesResponse')
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[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
169
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
201
+ # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
202
+ # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
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[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
182
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
214
+ # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
215
+ # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
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, Fixnum, Hash)>] ListAllMetricValuesResponse data, response status code and response headers
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
- if @api_client.config.client_side_validation && opts[:'dimension'] && !['asn', 'browser', 'browser_version', 'cdn', 'country', 'experiment_name', 'operating_system', 'operating_system_version', 'player_name', 'player_software', 'player_software_version', 'player_version', 'preroll_ad_asset_hostname', 'preroll_ad_tag_hostname', 'preroll_played', 'preroll_requested', 'source_hostname', 'source_type', 'stream_type', 'sub_property_id', 'video_series', 'video_title'].include?(opts[:'dimension'])
191
- fail ArgumentError, 'invalid value for "dimension", must be one of asn, browser, browser_version, cdn, country, experiment_name, operating_system, operating_system_version, player_name, player_software, player_software_version, player_version, preroll_ad_asset_hostname, preroll_ad_tag_hostname, preroll_played, preroll_requested, source_hostname, source_type, stream_type, sub_property_id, video_series, video_title'
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 = nil
213
- auth_names = ['accessToken']
214
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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 => 'ListAllMetricValuesResponse')
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 deafult for the metric will be used.
233
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
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[]&#x3D;operating_system:windows&amp;filters[]&#x3D;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 &#x60;limit&#x60; (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[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
282
+ # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
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 deafult for the metric will be used.
251
- # @option opts [Array<String>] :filters Filter key:value pairs. Must be provided as an array query string parameter (e.g. filters[]&#x3D;operating_system:windows&amp;filters[]&#x3D;country:US). Possible filter names are the same as returned by the List Filters endpoint.
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[]&#x3D;operating_system:windows&amp;filters[]&#x3D;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 &#x60;limit&#x60;
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[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
257
- # @return [Array<(ListBreakdownValuesResponse, Fixnum, Hash)>] ListBreakdownValuesResponse data, response status code and response headers
300
+ # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
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
- if @api_client.config.client_side_validation && !['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', 'rebuffer_count', 'rebuffer_duration', 'rebuffer_frequency', 'rebuffer_percentage', 'rebuffer_score', 'requests_for_first_preroll', 'seek_latency', 'startup_time_score', 'upscale_percentage', 'video_quality_score', 'video_startup_preroll_load_time', 'video_startup_preroll_request_time', 'video_startup_time', 'viewer_experience_score'].include?(metric_id)
268
- fail ArgumentError, "invalid value for 'metric_id', must be one of 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, rebuffer_count, rebuffer_duration, rebuffer_frequency, rebuffer_percentage, rebuffer_score, requests_for_first_preroll, seek_latency, startup_time_score, upscale_percentage, video_quality_score, video_startup_preroll_load_time, video_startup_preroll_request_time, video_startup_time, viewer_experience_score"
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
- if @api_client.config.client_side_validation && opts[:'group_by'] && !['asn', 'browser', 'browser_version', 'cdn', 'country', 'experiment_name', 'operating_system', 'operating_system_version', 'player_name', 'player_software', 'player_software_version', 'player_version', 'preroll_ad_asset_hostname', 'preroll_ad_tag_hostname', 'preroll_played', 'preroll_requested', 'source_hostname', 'source_type', 'stream_type', 'sub_property_id', 'video_series', 'video_title'].include?(opts[:'group_by'])
271
- fail ArgumentError, 'invalid value for "group_by", must be one of asn, browser, browser_version, cdn, country, experiment_name, operating_system, operating_system_version, player_name, player_software, player_software_version, player_version, preroll_ad_asset_hostname, preroll_ad_tag_hostname, preroll_played, preroll_requested, source_hostname, source_type, stream_type, sub_property_id, video_series, video_title'
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
- if @api_client.config.client_side_validation && opts[:'measurement'] && !['95th', 'median', 'avg'].include?(opts[:'measurement'])
274
- fail ArgumentError, 'invalid value for "measurement", must be one of 95th, median, avg'
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
- if @api_client.config.client_side_validation && opts[:'order_by'] && !['negative_impact', 'value', 'views', 'field'].include?(opts[:'order_by'])
277
- fail ArgumentError, 'invalid value for "order_by", must be one of negative_impact, value, views, field'
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
- if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction'])
280
- fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc'
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 = nil
306
- auth_names = ['accessToken']
307
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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 => 'ListBreakdownValuesResponse')
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 deafult for the metric will be used.
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[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
385
+ # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
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 deafult for the metric will be used.
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[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
340
- # @return [Array<(ListInsightsResponse, Fixnum, Hash)>] ListInsightsResponse data, response status code and response headers
398
+ # @option opts [Array<String>] :timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]&#x3D;). Accepted formats are... * array of epoch timestamps e.g. timeframe[]&#x3D;1498867200&amp;timeframe[]&#x3D;1498953600 * duration string e.g. timeframe[]&#x3D;24:hours or timeframe[]&#x3D;7:days.
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
- if @api_client.config.client_side_validation && !['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', 'rebuffer_count', 'rebuffer_duration', 'rebuffer_frequency', 'rebuffer_percentage', 'rebuffer_score', 'requests_for_first_preroll', 'seek_latency', 'startup_time_score', 'upscale_percentage', 'video_quality_score', 'video_startup_preroll_load_time', 'video_startup_preroll_request_time', 'video_startup_time', 'viewer_experience_score'].include?(metric_id)
351
- fail ArgumentError, "invalid value for 'metric_id', must be one of 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, rebuffer_count, rebuffer_duration, rebuffer_frequency, rebuffer_percentage, rebuffer_score, requests_for_first_preroll, seek_latency, startup_time_score, upscale_percentage, video_quality_score, video_startup_preroll_load_time, video_startup_preroll_request_time, video_startup_time, viewer_experience_score"
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
- if @api_client.config.client_side_validation && opts[:'measurement'] && !['95th', 'median', 'avg'].include?(opts[:'measurement'])
354
- fail ArgumentError, 'invalid value for "measurement", must be one of 95th, median, avg'
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
- if @api_client.config.client_side_validation && opts[:'order_direction'] && !['asc', 'desc'].include?(opts[:'order_direction'])
357
- fail ArgumentError, 'invalid value for "order_direction", must be one of asc, desc'
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 = nil
378
- auth_names = ['accessToken']
379
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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 => 'ListInsightsResponse')
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