=begin #Subskribe API #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.41 =end require 'uri' module SubskribeDevClient class MetricsReportingApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # submit request to generate external arr metrics # returns the request with its captured id. Arr metrics will be generated as a backend job # @param [Hash] opts the optional parameters # @option opts [ExternalArrScheduleJson] :body # @return [nil] def add_external_arr_metrics(opts = {}) add_external_arr_metrics_with_http_info(opts) nil end # submit request to generate external arr metrics # returns the request with its captured id. Arr metrics will be generated as a backend job # @param [Hash] opts the optional parameters # @option opts [ExternalArrScheduleJson] :body # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def add_external_arr_metrics_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MetricsReportingApi.add_external_arr_metrics ...' end # resource path local_var_path = '/metricsReporting/externalArrMetrics' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: MetricsReportingApi#add_external_arr_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # gets external arr metrics request for the provided id # returns the external arr metrics request for the provided id # @param id id of the externalArrMetrics request # @param [Hash] opts the optional parameters # @return [nil] def get_external_arr_metrics(id, opts = {}) get_external_arr_metrics_with_http_info(id, opts) nil end # gets external arr metrics request for the provided id # returns the external arr metrics request for the provided id # @param id id of the externalArrMetrics request # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_external_arr_metrics_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MetricsReportingApi.get_external_arr_metrics ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling MetricsReportingApi.get_external_arr_metrics" end # resource path local_var_path = '/metricsReporting/externalArrMetrics/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: MetricsReportingApi#get_external_arr_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # gets external arr metrics requests submitted # returns the paginated list of external arr metrics requests # @param [Hash] opts the optional parameters # @option opts [String] :cursor # @option opts [Integer] :limit # @return [nil] def get_external_arr_metrics1(opts = {}) get_external_arr_metrics1_with_http_info(opts) nil end # gets external arr metrics requests submitted # returns the paginated list of external arr metrics requests # @param [Hash] opts the optional parameters # @option opts [String] :cursor # @option opts [Integer] :limit # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_external_arr_metrics1_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MetricsReportingApi.get_external_arr_metrics1 ...' end # resource path local_var_path = '/metricsReporting/externalArrMetrics' # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: MetricsReportingApi#get_external_arr_metrics1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # submit request to generate/regenerate arr metrics for a subscription # returns 200 if the result is successfully submitted to a background task # @param subscription_id id of the subscription # @param [Hash] opts the optional parameters # @return [nil] def populate_arr_metrics_for_subscription(subscription_id, opts = {}) populate_arr_metrics_for_subscription_with_http_info(subscription_id, opts) nil end # submit request to generate/regenerate arr metrics for a subscription # returns 200 if the result is successfully submitted to a background task # @param subscription_id id of the subscription # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def populate_arr_metrics_for_subscription_with_http_info(subscription_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MetricsReportingApi.populate_arr_metrics_for_subscription ...' end # verify the required parameter 'subscription_id' is set if @api_client.config.client_side_validation && subscription_id.nil? fail ArgumentError, "Missing the required parameter 'subscription_id' when calling MetricsReportingApi.populate_arr_metrics_for_subscription" end # resource path local_var_path = '/metricsReporting/populateArrMetrics/subscriptions/{subscriptionId}'.sub('{' + 'subscriptionId' + '}', subscription_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: MetricsReportingApi#populate_arr_metrics_for_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end