=begin #Mailchimp Transactional API #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.4 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 TagsApi 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 # /tags/all-time-series # Return the recent history (hourly stats for the last 30 days) for all tags # @param body # @param [Hash] opts the optional parameters # @return [Array] def all_time_series(body = {}, opts = {}) data, _status_code, _headers = all_time_series_with_http_info(body, opts) data end # /tags/all-time-series # Return the recent history (hourly stats for the last 30 days) for all tags # @param body # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def all_time_series_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/tags/all-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 # /tags/delete # Deletes a tag permanently. Deleting a tag removes the tag from any messages that have been sent, and also deletes the tag's stats. There is no way to undo this operation, so use it carefully. # @param body # @param [Hash] opts the optional parameters # @return [InlineResponse20055] def delete(body = {}, opts = {}) data, _status_code, _headers = delete_with_http_info(body, opts) data end # /tags/delete # Deletes a tag permanently. Deleting a tag removes the tag from any messages that have been sent, and also deletes the tag's stats. There is no way to undo this operation, so use it carefully. # @param body # @param [Hash] opts the optional parameters # @return [Array<(InlineResponse20055, Fixnum, Hash)>] InlineResponse20055 data, response status code and response headers def delete_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/tags/delete' # 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 => 'InlineResponse20055') return data, status_code, headers end # /tags/info # Return more detailed information about a single tag, including aggregates of recent stats # @param body # @param [Hash] opts the optional parameters # @return [InlineResponse20056] def info(body = {}, opts = {}) data, _status_code, _headers = info_with_http_info(body, opts) data end # /tags/info # Return more detailed information about a single tag, including aggregates of recent stats # @param body # @param [Hash] opts the optional parameters # @return [Array<(InlineResponse20056, Fixnum, Hash)>] InlineResponse20056 data, response status code and response headers def info_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/tags/info' # 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 => 'InlineResponse20056') return data, status_code, headers end # /tags/list # Return all of the user-defined tag information # @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 # /tags/list # Return all of the user-defined tag information # @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 = '/tags/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 # /tags/time-series # Return the recent history (hourly stats for the last 30 days) for a tag # @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 # /tags/time-series # Return the recent history (hourly stats for the last 30 days) for a tag # @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 = '/tags/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 end end