=begin # Mux Ruby - Copyright 2019 Mux Inc. # NOTE: This file is auto generated. Do not edit this file manually. =end require 'spec_helper' require 'json' # Unit tests for MuxRuby::MetricsApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe 'MetricsApi' do before do # run before each test @instance = MuxRuby::MetricsApi.new end after do # run after each test end describe 'test an instance of MetricsApi' do it 'should create an instance of MetricsApi' do expect(@instance).to be_instance_of(MuxRuby::MetricsApi) end end # unit tests for get_metric_timeseries_data # Get metric timeseries data # Returns timeseries data for a specific metric # @param metric_id ID of the Metric # @param [Hash] opts the optional parameters # @option opts [Array] :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. # @option opts [Array] :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. # @option opts [String] :measurement Measurement for the provided metric. If omitted, the deafult for the metric will be used. # @option opts [String] :order_direction Sort order. # @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. # @return [GetMetricTimeseriesDataResponse] describe 'get_metric_timeseries_data test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_overall_values # Get Overall values # 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. # @param metric_id ID of the Metric # @param [Hash] opts the optional parameters # @option opts [Array] :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. # @option opts [Array] :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. # @option opts [String] :measurement Measurement for the provided metric. If omitted, the deafult for the metric will be used. # @return [GetOverallValuesResponse] describe 'get_overall_values test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_all_metric_values # List all metric values # List all of the values across every breakdown for a specific metric # @param [Hash] opts the optional parameters # @option opts [Array] :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. # @option opts [Array] :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. # @option opts [String] :dimension Dimension the specified value belongs to # @option opts [String] :value Value to show all available metrics for # @return [ListAllMetricValuesResponse] describe 'list_all_metric_values test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_breakdown_values # List breakdown values # List the breakdown values for a specific metric # @param metric_id ID of the Metric # @param [Hash] opts the optional parameters # @option opts [String] :group_by Breakdown value to group the results by # @option opts [String] :measurement Measurement for the provided metric. If omitted, the deafult for the metric will be used. # @option opts [Array] :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. # @option opts [Integer] :limit Number of items to include in the response # @option opts [Integer] :page Offset by this many pages, of the size of `limit` # @option opts [String] :order_by Value to order the results by # @option opts [String] :order_direction Sort order. # @option opts [Array] :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. # @return [ListBreakdownValuesResponse] describe 'list_breakdown_values test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_insights # List Insights # 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. # @param metric_id ID of the Metric # @param [Hash] opts the optional parameters # @option opts [String] :measurement Measurement for the provided metric. If omitted, the deafult for the metric will be used. # @option opts [String] :order_direction Sort order. # @option opts [Array] :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. # @return [ListInsightsResponse] describe 'list_insights test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end