Class: MailchimpTransactional::TagsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/MailchimpTransactional/api/tags_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TagsApi

Returns a new instance of TagsApi.



19
20
21
# File 'lib/MailchimpTransactional/api/tags_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/MailchimpTransactional/api/tags_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#all_time_series(body = {}) ⇒ Array<(Array<InlineResponse20031>, Fixnum, Hash)>

View all tags history Return the recent history (hourly stats for the last 30 days) for all tags.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Array<InlineResponse20031>, Fixnum, Hash)>)

    Array<InlineResponse20031> data, response status code and response headers



28
29
30
31
# File 'lib/MailchimpTransactional/api/tags_api.rb', line 28

def all_time_series(body = {})
  data = @api_client.call_api(:POST, '/tags/all-time-series', body)
  data
end

#delete(body = {}) ⇒ Array<(InlineResponse20058, Fixnum, Hash)>

Delete tag Deletes a tag permanently. Deleting a tag removes the tag from any messages that have been sent, and also deletes the tag&#39;s stats. There is no way to undo this operation, so use it carefully.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(InlineResponse20058, Fixnum, Hash)>)

    InlineResponse20058 data, response status code and response headers



38
39
40
41
# File 'lib/MailchimpTransactional/api/tags_api.rb', line 38

def delete(body = {})
  data = @api_client.call_api(:POST, '/tags/delete', body)
  data
end

#info(body = {}) ⇒ Array<(InlineResponse20059, Fixnum, Hash)>

Get tag info Return more detailed information about a single tag, including aggregates of recent stats.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(InlineResponse20059, Fixnum, Hash)>)

    InlineResponse20059 data, response status code and response headers



48
49
50
51
# File 'lib/MailchimpTransactional/api/tags_api.rb', line 48

def info(body = {})
  data = @api_client.call_api(:POST, '/tags/info', body)
  data
end

#list(body = {}) ⇒ Array<(Array<InlineResponse20057>, Fixnum, Hash)>

List tags Return all of the user-defined tag information.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Array<InlineResponse20057>, Fixnum, Hash)>)

    Array<InlineResponse20057> data, response status code and response headers



58
59
60
61
# File 'lib/MailchimpTransactional/api/tags_api.rb', line 58

def list(body = {})
  data = @api_client.call_api(:POST, '/tags/list', body)
  data
end

#time_series(body = {}) ⇒ Array<(Array<InlineResponse20031>, Fixnum, Hash)>

View tag history Return the recent history (hourly stats for the last 30 days) for a tag.

Parameters:

  • body (defaults to: {})
  • opts (Hash)

    the optional parameters

Returns:

  • (Array<(Array<InlineResponse20031>, Fixnum, Hash)>)

    Array<InlineResponse20031> data, response status code and response headers



68
69
70
71
# File 'lib/MailchimpTransactional/api/tags_api.rb', line 68

def time_series(body = {})
  data = @api_client.call_api(:POST, '/tags/time-series', body)
  data
end