Class: MailchimpMarketing::ReportingApi

Inherits:
Object
  • Object
show all
Defined in:
lib/MailchimpMarketing/api/reporting_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client) ⇒ ReportingApi

Returns a new instance of ReportingApi.



19
20
21
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 19

def initialize(api_client)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_facebook_ad_product_activity_report(outreach_id = {}, opts = {}) ⇒ InlineResponse2008

__summary__ Get breakdown of product activity for an outreach

Parameters:

  • outreach_id (defaults to: {})

    The outreach id.

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

  • :sort_field (String)

    Returns files sorted by the specified field.

Returns:

  • (InlineResponse2008)


184
185
186
187
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 184

def get_facebook_ad_product_activity_report(outreach_id = {}, opts = {})
  data, _status_code, _headers = get_facebook_ad_product_activity_report_with_http_info(outreach_id, opts)
  data
end

#get_facebook_ad_product_activity_report_with_http_info(outreach_id, opts = {}) ⇒ Array<(InlineResponse2008, Fixnum, Hash)>

__summary__ Get breakdown of product activity for an outreach

Parameters:

  • outreach_id

    The outreach id.

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

  • :sort_field (String)

    Returns files sorted by the specified field.

Returns:

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

    InlineResponse2008 data, response status code and response headers



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 199

def get_facebook_ad_product_activity_report_with_http_info(outreach_id, opts = {})
  # resource path
  local_var_path = '/reporting/facebook-ads/{outreach_id}/ecommerce-product-activity'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  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,
    :return_type => 'InlineResponse2008')
  return data, status_code, headers
end

#get_facebook_ad_report(outreach_id = {}, opts = {}) ⇒ InlineResponse20012

__summary__ Get report of a facebook ad

Parameters:

  • outreach_id (defaults to: {})

    The outreach id.

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (InlineResponse20012)


131
132
133
134
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 131

def get_facebook_ad_report(outreach_id = {}, opts = {})
  data, _status_code, _headers = get_facebook_ad_report_with_http_info(outreach_id, opts)
  data
end

#get_facebook_ad_report_with_http_info(outreach_id, opts = {}) ⇒ Array<(InlineResponse20012, Fixnum, Hash)>

__summary__ Get report of a facebook ad

Parameters:

  • outreach_id

    The outreach id.

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

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

    InlineResponse20012 data, response status code and response headers



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 143

def get_facebook_ad_report_with_http_info(outreach_id, opts = {})
  # resource path
  local_var_path = '/reporting/facebook-ads/{outreach_id}'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  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,
    :return_type => 'InlineResponse20012')
  return data, status_code, headers
end

#get_facebook_ads_report_all(opts = {}) ⇒ InlineResponse20011

__summary__ Get reports of Facebook Ads

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

  • :sort_field (String)

    Returns files sorted by the specified field.

  • :sort_dir (String)

    Determines the order direction for sorted results.

Returns:

  • (InlineResponse20011)


74
75
76
77
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 74

def get_facebook_ads_report_all(opts = {})
  data, _status_code, _headers = get_facebook_ads_report_all_with_http_info(opts)
  data
end

#get_facebook_ads_report_all_with_http_info(opts = {}) ⇒ Array<(InlineResponse20011, Fixnum, Hash)>

__summary__ Get reports of Facebook Ads

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

  • :sort_field (String)

    Returns files sorted by the specified field.

  • :sort_dir (String)

    Determines the order direction for sorted results.

Returns:

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

    InlineResponse20011 data, response status code and response headers



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 89

def get_facebook_ads_report_all_with_http_info(opts = {})
  # resource path
  local_var_path = '/reporting/facebook-ads'

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
  query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  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,
    :return_type => 'InlineResponse20011')
  return data, status_code, headers
end

#get_landing_page_report(outreach_id = {}, opts = {}) ⇒ LandingPageReport

__summary__ Get report of a landing page

Parameters:

  • outreach_id (defaults to: {})

    The outreach id.

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

  • (LandingPageReport)


294
295
296
297
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 294

def get_landing_page_report(outreach_id = {}, opts = {})
  data, _status_code, _headers = get_landing_page_report_with_http_info(outreach_id, opts)
  data
end

#get_landing_page_report_with_http_info(outreach_id, opts = {}) ⇒ Array<(LandingPageReport, Fixnum, Hash)>

__summary__ Get report of a landing page

Parameters:

  • outreach_id

    The outreach id.

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

Returns:

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

    LandingPageReport data, response status code and response headers



306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 306

def get_landing_page_report_with_http_info(outreach_id, opts = {})
  # resource path
  local_var_path = '/reporting/landing-pages/{outreach_id}'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  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,
    :return_type => 'LandingPageReport')
  return data, status_code, headers
end

#get_landing_page_reports_all(opts = {}) ⇒ InlineResponse20013

__summary__ Get reports of Landing Pages

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000 (default to 10)

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0. (default to 0)

Returns:

  • (InlineResponse20013)


241
242
243
244
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 241

def get_landing_page_reports_all(opts = {})
  data, _status_code, _headers = get_landing_page_reports_all_with_http_info(opts)
  data
end

#get_landing_page_reports_all_with_http_info(opts = {}) ⇒ Array<(InlineResponse20013, Fixnum, Hash)>

__summary__ Get reports of Landing Pages

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.

  • :exclude_fields (Array<String>)

    A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

  • :count (Integer)

    The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 10. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 1000

  • :offset (Integer)

    The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is 0.

Returns:

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

    InlineResponse20013 data, response status code and response headers



254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 254

def get_landing_page_reports_all_with_http_info(opts = {})
  # resource path
  local_var_path = '/reporting/landing-pages'

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  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,
    :return_type => 'InlineResponse20013')
  return data, status_code, headers
end

#info(opts = {}) ⇒ Reporting

Get information about the reporting endpoint’s resources Get information about the reporting endpoint’s resources

Parameters:

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

    the optional parameters

Returns:

  • (Reporting)


26
27
28
29
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 26

def info(opts = {})
  data, _status_code, _headers = info_with_http_info(opts)
  data
end

#info_with_http_info(opts = {}) ⇒ Array<(Reporting, Fixnum, Hash)>

Get information about the reporting endpoint&#39;s resources Get information about the reporting endpoint&#39;s resources

Parameters:

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

    the optional parameters

Returns:

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

    Reporting data, response status code and response headers



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/MailchimpMarketing/api/reporting_api.rb', line 35

def info_with_http_info(opts = {})
  # resource path
  local_var_path = '/reporting'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  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,
    :return_type => 'Reporting')
  return data, status_code, headers
end