=begin #Mailchimp Transactional API #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.9 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 # Add tracking domains # Add a tracking domain to your account. # @param body # @param [Hash] opts the optional parameters # @return [InlineResponse20068] def add_tracking_domain(body = {}, opts = {}) data = add_tracking_domain_with_http_info(body, opts) data end # Add tracking domains # 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) data = @api_client.call_api(:POST, local_var_path, :body => body) return data end # Check cname settings # 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 = check_tracking_domain_with_http_info(body, opts) data end # Check cname settings # 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) data = @api_client.call_api(:POST, local_var_path, :body => body) return data end # List most clicked ur ls # Get the 100 most clicked URLs. # @param body # @param [Hash] opts the optional parameters # @return [Array] def list(body = {}, opts = {}) data = list_with_http_info(body, opts) data end # List most clicked ur ls # 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) data = @api_client.call_api(:POST, local_var_path, :body => body) return data end # Search most clicked ur ls # 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 = search_with_http_info(body, opts) data end # Search most clicked ur ls # 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) data = @api_client.call_api(:POST, local_var_path, :body => body) return data end # Get url history # 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 = time_series_with_http_info(body, opts) data end # Get url history # 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) data = @api_client.call_api(:POST, local_var_path, :body => body) return data end # List 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 = tracking_domains_with_http_info(body, opts) data end # List 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) data = @api_client.call_api(:POST, local_var_path, :body => body) return data end end end