=begin #Mailchimp Transactional API #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.5 Contact: apihelp@mandrill.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.12 =end require 'uri' module MailchimpTransactional class UrlsApi attr_accessor :api_client attr_accessor :api_key def initialize(api_key = '', api_client = ApiClient.default) @api_key = api_key @api_client = api_client end # /urls/add-tracking-domain # Add a tracking domain to your account # @param body # @param [Hash] opts the optional parameters # @return [InlineResponse20068] def add_tracking_domain(body = {}, opts = {}) data, _status_code, _headers = add_tracking_domain_with_http_info(body, opts) data end # /urls/add-tracking-domain # Add a tracking domain to your account # @param body # @param [Hash] opts the optional parameters # @return [Array<(InlineResponse20068, Fixnum, Hash)>] InlineResponse20068 data, response status code and response headers def add_tracking_domain_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/urls/add-tracking-domain' # http body (model) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :body => body, :auth_names => auth_names, :return_type => 'InlineResponse20068') return data, status_code, headers end # /urls/check-tracking-domain # Checks the CNAME settings for a tracking domain. The domain must have been added already with the add-tracking-domain call # @param body # @param [Hash] opts the optional parameters # @return [InlineResponse20068] def check_tracking_domain(body = {}, opts = {}) data, _status_code, _headers = check_tracking_domain_with_http_info(body, opts) data end # /urls/check-tracking-domain # Checks the CNAME settings for a tracking domain. The domain must have been added already with the add-tracking-domain call # @param body # @param [Hash] opts the optional parameters # @return [Array<(InlineResponse20068, Fixnum, Hash)>] InlineResponse20068 data, response status code and response headers def check_tracking_domain_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/urls/check-tracking-domain' # http body (model) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :body => body, :auth_names => auth_names, :return_type => 'InlineResponse20068') return data, status_code, headers end # /urls/list # Get the 100 most clicked URLs # @param body # @param [Hash] opts the optional parameters # @return [Array] def list(body = {}, opts = {}) data, _status_code, _headers = list_with_http_info(body, opts) data end # /urls/list # Get the 100 most clicked URLs # @param body # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def list_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/urls/list' # http body (model) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :body => body, :auth_names => auth_names, :return_type => 'Array') return data, status_code, headers end # /urls/search (deprecated) # Return the 100 most clicked URLs that match the search query given # @param body # @param [Hash] opts the optional parameters # @return [Array] def search(body = {}, opts = {}) data, _status_code, _headers = search_with_http_info(body, opts) data end # /urls/search (deprecated) # Return the 100 most clicked URLs that match the search query given # @param body # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def search_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/urls/search' # http body (model) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :body => body, :auth_names => auth_names, :return_type => 'Array') return data, status_code, headers end # /urls/time-series # Return the recent history (hourly stats for the last 30 days) for a url # @param body # @param [Hash] opts the optional parameters # @return [Array] def time_series(body = {}, opts = {}) data, _status_code, _headers = time_series_with_http_info(body, opts) data end # /urls/time-series # Return the recent history (hourly stats for the last 30 days) for a url # @param body # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def time_series_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/urls/time-series' # http body (model) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :body => body, :auth_names => auth_names, :return_type => 'Array') return data, status_code, headers end # /urls/tracking-domains # Get the list of tracking domains set up for this account # @param body # @param [Hash] opts the optional parameters # @return [Array] def tracking_domains(body = {}, opts = {}) data, _status_code, _headers = tracking_domains_with_http_info(body, opts) data end # /urls/tracking-domains # Get the list of tracking domains set up for this account # @param body # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def tracking_domains_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/urls/tracking-domains' # http body (model) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :body => body, :auth_names => auth_names, :return_type => 'Array') return data, status_code, headers end end end