Class: ConstantContactClient::EmailReportingApi
- Inherits:
-
Object
- Object
- ConstantContactClient::EmailReportingApi
- Defined in:
- lib/constant_contact_client/api/email_reporting_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_bounces_report(campaign_activity_id, opts = {}) ⇒ GetBouncesReport200Response
GET an Email Bounces Report Use this method to get a report listing contact bounce data for the specified email campaign activity.
-
#get_bounces_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetBouncesReport200Response, Integer, Hash)>
GET an Email Bounces Report Use this method to get a report listing contact bounce data for the specified email campaign activity.
-
#get_campaign_activity_link_report(campaign_activity_id, opts = {}) ⇒ GetCampaignActivityLinkReport200Response
GET an Email Links Report Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link.
-
#get_campaign_activity_link_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetCampaignActivityLinkReport200Response, Integer, Hash)>
GET an Email Links Report Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link.
-
#get_clicks_report(campaign_activity_id, opts = {}) ⇒ GetClicksReport200Response
GET an Email Clicks Report Use this method to get each time a contact clicked a link, the click date and time, and the device type they used.
-
#get_clicks_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetClicksReport200Response, Integer, Hash)>
GET an Email Clicks Report Use this method to get each time a contact clicked a link, the click date and time, and the device type they used.
-
#get_did_not_opens_report(campaign_activity_id, opts = {}) ⇒ GetDidNotOpensReport200Response
GET an Email Did Not Opens Report Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity.
-
#get_did_not_opens_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetDidNotOpensReport200Response, Integer, Hash)>
GET an Email Did Not Opens Report Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity.
-
#get_email_campaign_activity_report(campaign_activity_ids, opts = {}) ⇒ GetEmailCampaignActivityReport200Response
GET an Email Campaign Activity Stats Report Use this method to get performance tracking statistics for up to ten email campaign activities.
-
#get_email_campaign_activity_report_with_http_info(campaign_activity_ids, opts = {}) ⇒ Array<(GetEmailCampaignActivityReport200Response, Integer, Hash)>
GET an Email Campaign Activity Stats Report Use this method to get performance tracking statistics for up to ten email campaign activities.
-
#get_email_campaign_report(opts = {}) ⇒ GetEmailCampaignReport200Response
GET an Email Campaigns Summary Report Use this method to get aggregate email campaign statistics for up to five hundred email campaigns.
-
#get_email_campaign_report_with_http_info(opts = {}) ⇒ Array<(GetEmailCampaignReport200Response, Integer, Hash)>
GET an Email Campaigns Summary Report Use this method to get aggregate email campaign statistics for up to five hundred email campaigns.
-
#get_email_opens_report(campaign_activity_id, opts = {}) ⇒ GetEmailOpensReport200Response
GET an Email Opens Report Use this method to get each time a contact opened a specific email campaign activity.
-
#get_email_opens_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetEmailOpensReport200Response, Integer, Hash)>
GET an Email Opens Report Use this method to get each time a contact opened a specific email campaign activity.
-
#get_email_sends_report(campaign_activity_id, opts = {}) ⇒ GetEmailSendsReport200Response
GET an Email Sends Report Use this method to get each contact that was sent a specific email campaign activity.
-
#get_email_sends_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetEmailSendsReport200Response, Integer, Hash)>
GET an Email Sends Report Use this method to get each contact that was sent a specific email campaign activity.
-
#get_email_stats_report(campaign_ids, opts = {}) ⇒ GetEmailStatsReport200Response
GET an Email Campaign Stats Report Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how.
-
#get_email_stats_report_with_http_info(campaign_ids, opts = {}) ⇒ Array<(GetEmailStatsReport200Response, Integer, Hash)>
GET an Email Campaign Stats Report Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how.
-
#get_forwards_report(campaign_activity_id, opts = {}) ⇒ GetForwardsReport200Response
GET an Email Forwards Report Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer.
-
#get_forwards_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetForwardsReport200Response, Integer, Hash)>
GET an Email Forwards Report Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer.
-
#get_optouts_report(campaign_activity_id, opts = {}) ⇒ GetOptoutsReport200Response
GET an Email Opt-outs Report Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account.
-
#get_optouts_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetOptoutsReport200Response, Integer, Hash)>
GET an Email Opt-outs Report Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account.
-
#get_unique_opens_report(campaign_activity_id, opts = {}) ⇒ GetEmailOpensReport200Response
GET an Email Unique Opens Report Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity.
-
#get_unique_opens_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetEmailOpensReport200Response, Integer, Hash)>
GET an Email Unique Opens Report Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity.
-
#initialize(api_client = ApiClient.default) ⇒ EmailReportingApi
constructor
A new instance of EmailReportingApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ EmailReportingApi
Returns a new instance of EmailReportingApi.
19 20 21 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_bounces_report(campaign_activity_id, opts = {}) ⇒ GetBouncesReport200Response
GET an Email Bounces Report Use this method to get a report listing contact bounce data for the specified email campaign activity. This report lists the most recent bounce data first and includes contact information, such as the contact’s email address, unique ID, and the email bounce date and time. Use the bounce_code
query parameter to limit the type of bounce data to return. For more use case information, see [Get a Bounces Report for an Email Campaign Activity](/api_guide/email_summary_bounces_report.html) in the API guide.
29 30 31 32 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 29 def get_bounces_report(campaign_activity_id, opts = {}) data, _status_code, _headers = get_bounces_report_with_http_info(campaign_activity_id, opts) data end |
#get_bounces_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetBouncesReport200Response, Integer, Hash)>
GET an Email Bounces Report Use this method to get a report listing contact bounce data for the specified email campaign activity. This report lists the most recent bounce data first and includes contact information, such as the contact's email address, unique ID, and the email bounce date and time. Use the <code>bounce_code</code> query parameter to limit the type of bounce data to return. For more use case information, see [Get a Bounces Report for an Email Campaign Activity](/api_guide/email_summary_bounces_report.html) in the API guide.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 41 def get_bounces_report_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_bounces_report ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailReportingApi.get_bounces_report" end allowable_values = ["B", "D", "F", "S", "V", "X", "Z"] if @api_client.config.client_side_validation && opts[:'bounce_code'] && !opts[:'bounce_code'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"bounce_code\", must include one of #{allowable_values}" end # resource path local_var_path = '/reports/email_reports/{campaign_activity_id}/tracking/bounces'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'bounce_code'] = @api_client.build_collection_param(opts[:'bounce_code'], :multi) if !opts[:'bounce_code'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetBouncesReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_bounces_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_bounces_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_campaign_activity_link_report(campaign_activity_id, opts = {}) ⇒ GetCampaignActivityLinkReport200Response
GET an Email Links Report Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link. To include link details for links that were not clicked, set the ‘no_clicks` query parameter to `true`. You can return reporting data for `primary_email` and `resend` role email campaign activities. For more use case information, see [Get an Email Links Report](/api_guide/email_links_report.html) in the API guide.
101 102 103 104 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 101 def get_campaign_activity_link_report(campaign_activity_id, opts = {}) data, _status_code, _headers = get_campaign_activity_link_report_with_http_info(campaign_activity_id, opts) data end |
#get_campaign_activity_link_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetCampaignActivityLinkReport200Response, Integer, Hash)>
GET an Email Links Report Use this method to return link details, including the number of unique contacts that clicked each link in an email campaign activity, and the type of action associated with clicking each link. To include link details for links that were not clicked, set the `no_clicks` query parameter to `true`. You can return reporting data for `primary_email` and `resend` role email campaign activities. For more use case information, see [Get an Email Links Report](/api_guide/email_links_report.html) in the API guide.
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 112 def get_campaign_activity_link_report_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_campaign_activity_link_report ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailReportingApi.get_campaign_activity_link_report" end # resource path local_var_path = '/reports/email_reports/{campaign_activity_id}/links'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'no_clicks'] = opts[:'no_clicks'] if !opts[:'no_clicks'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetCampaignActivityLinkReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_campaign_activity_link_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_campaign_activity_link_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_clicks_report(campaign_activity_id, opts = {}) ⇒ GetClicksReport200Response
GET an Email Clicks Report Use this method to get each time a contact clicked a link, the click date and time, and the device type they used. Use the ‘url_id` query parameter to get a clicks report for a specific link URL. Clicks report data is sorted with most recent activity listed first.
168 169 170 171 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 168 def get_clicks_report(campaign_activity_id, opts = {}) data, _status_code, _headers = get_clicks_report_with_http_info(campaign_activity_id, opts) data end |
#get_clicks_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetClicksReport200Response, Integer, Hash)>
GET an Email Clicks Report Use this method to get each time a contact clicked a link, the click date and time, and the device type they used. Use the `url_id` query parameter to get a clicks report for a specific link URL. Clicks report data is sorted with most recent activity listed first.
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 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 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 180 def get_clicks_report_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_clicks_report ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailReportingApi.get_clicks_report" end # resource path local_var_path = '/reports/email_reports/{campaign_activity_id}/tracking/clicks'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'url_id'] = opts[:'url_id'] if !opts[:'url_id'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetClicksReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_clicks_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_clicks_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_did_not_opens_report(campaign_activity_id, opts = {}) ⇒ GetDidNotOpensReport200Response
GET an Email Did Not Opens Report Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity. This report lists contact information such as the contact’s email address and unique ID, and the date and time that the email campaign activity was sent. This report lists the most recent activity first. For more use case information, see [Get a Did Not Opens Report for an Email Campaign Activity](/api_guide/email_summary_non_opens_report.html) in the API guide.
236 237 238 239 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 236 def get_did_not_opens_report(campaign_activity_id, opts = {}) data, _status_code, _headers = get_did_not_opens_report_with_http_info(campaign_activity_id, opts) data end |
#get_did_not_opens_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetDidNotOpensReport200Response, Integer, Hash)>
GET an Email Did Not Opens Report Use this method to get a report listing each contact that was sent, but did not open the specified email campaign activity. This report lists contact information such as the contact's email address and unique ID, and the date and time that the email campaign activity was sent. This report lists the most recent activity first. For more use case information, see [Get a Did Not Opens Report for an Email Campaign Activity](/api_guide/email_summary_non_opens_report.html) in the API guide.
247 248 249 250 251 252 253 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 287 288 289 290 291 292 293 294 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 247 def get_did_not_opens_report_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_did_not_opens_report ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailReportingApi.get_did_not_opens_report" end # resource path local_var_path = '/reports/email_reports/{campaign_activity_id}/tracking/didnotopens'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetDidNotOpensReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_did_not_opens_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_did_not_opens_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_campaign_activity_report(campaign_activity_ids, opts = {}) ⇒ GetEmailCampaignActivityReport200Response
GET an Email Campaign Activity Stats Report Use this method to get performance tracking statistics for up to ten email campaign activities. Statistics include the total number of times contacts interacted with your campaigns and how. For each ‘campaign_activity_id`, this method returns the `campaign_id`, the total counts (`stats`) for each type of tracked email activity, and the date and time that Constant Contact last refreshed (`last_refresh_time`) the `stats`. When requesting statistics for multiple email campaign activities, if one or more of the `campaign_activity_ids` do not exist, were deleted, or do not have any stats associated with it, the `campaign_activity_ids` and error details display under `errors`. If any single specified `campaign_activity_id` is invalid (malformed), a 404 error response is returned for all campaign activities.
301 302 303 304 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 301 def get_email_campaign_activity_report(campaign_activity_ids, opts = {}) data, _status_code, _headers = get_email_campaign_activity_report_with_http_info(campaign_activity_ids, opts) data end |
#get_email_campaign_activity_report_with_http_info(campaign_activity_ids, opts = {}) ⇒ Array<(GetEmailCampaignActivityReport200Response, Integer, Hash)>
GET an Email Campaign Activity Stats Report Use this method to get performance tracking statistics for up to ten email campaign activities. Statistics include the total number of times contacts interacted with your campaigns and how. For each `campaign_activity_id`, this method returns the `campaign_id`, the total counts (`stats`) for each type of tracked email activity, and the date and time that Constant Contact last refreshed (`last_refresh_time`) the `stats`. When requesting statistics for multiple email campaign activities, if one or more of the `campaign_activity_ids` do not exist, were deleted, or do not have any stats associated with it, the `campaign_activity_ids` and error details display under `errors`. If any single specified `campaign_activity_id` is invalid (malformed), a 404 error response is returned for all campaign activities.
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 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 311 def get_email_campaign_activity_report_with_http_info(campaign_activity_ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_email_campaign_activity_report ...' end # verify the required parameter 'campaign_activity_ids' is set if @api_client.config.client_side_validation && campaign_activity_ids.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_ids' when calling EmailReportingApi.get_email_campaign_activity_report" end # resource path local_var_path = '/reports/stats/email_campaign_activities/{campaign_activity_ids}'.sub('{' + 'campaign_activity_ids' + '}', CGI.escape(campaign_activity_ids.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEmailCampaignActivityReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_email_campaign_activity_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_email_campaign_activity_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_campaign_report(opts = {}) ⇒ GetEmailCampaignReport200Response
GET an Email Campaigns Summary Report Use this method to get aggregate email campaign statistics for up to five hundred email campaigns. The response results include the total number of times that each contact uniquely interacted with each tracked campaign activity. Results are sorted in descending order by the date that the email was last sent (last_sent_date
). Use the limit
query parameter to limit the number of email campaign summary reports listed on each page. For more use case information, see "[Get an Email Campaign Summary Report](/api_guide/email_bulk_campaign_summary_report.html)"
364 365 366 367 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 364 def get_email_campaign_report(opts = {}) data, _status_code, _headers = get_email_campaign_report_with_http_info(opts) data end |
#get_email_campaign_report_with_http_info(opts = {}) ⇒ Array<(GetEmailCampaignReport200Response, Integer, Hash)>
GET an Email Campaigns Summary Report Use this method to get aggregate email campaign statistics for up to five hundred email campaigns. The response results include the total number of times that each contact uniquely interacted with each tracked campaign activity. Results are sorted in descending order by the date that the email was last sent (<code>last_sent_date</code>). Use the <code>limit</code> query parameter to limit the number of email campaign summary reports listed on each page. For more use case information, see "[Get an Email Campaign Summary Report](/api_guide/email_bulk_campaign_summary_report.html)"
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 374 def get_email_campaign_report_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_email_campaign_report ...' end # resource path local_var_path = '/reports/summary_reports/email_campaign_summaries' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEmailCampaignReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_email_campaign_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_email_campaign_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_opens_report(campaign_activity_id, opts = {}) ⇒ GetEmailOpensReport200Response
GET an Email Opens Report Use this method to get each time a contact opened a specific email campaign activity. This report includes general contact information such as the contact’s email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Opens report for an Email Campaign Activity](/api_guide/email_summary_opens_report.html) in the API guide.
425 426 427 428 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 425 def get_email_opens_report(campaign_activity_id, opts = {}) data, _status_code, _headers = get_email_opens_report_with_http_info(campaign_activity_id, opts) data end |
#get_email_opens_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetEmailOpensReport200Response, Integer, Hash)>
GET an Email Opens Report Use this method to get each time a contact opened a specific email campaign activity. This report includes general contact information such as the contact's email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Opens report for an Email Campaign Activity](/api_guide/email_summary_opens_report.html) in the API guide.
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 436 def get_email_opens_report_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_email_opens_report ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailReportingApi.get_email_opens_report" end # resource path local_var_path = '/reports/email_reports/{campaign_activity_id}/tracking/opens'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEmailOpensReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_email_opens_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_email_opens_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_sends_report(campaign_activity_id, opts = {}) ⇒ GetEmailSendsReport200Response
GET an Email Sends Report Use this method to get each contact that was sent a specific email campaign activity. This sends report includes general contact data such as the date and time that the email campaign activity was sent to a contact’s email address, the contact’s first and last name, and unique ID. This report lists the most recent activity first. For more use case information, see [Get an Sends report for an Email Campaign Activity](/api_guide/email_summary_sends_report.html) in the API guide.
491 492 493 494 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 491 def get_email_sends_report(campaign_activity_id, opts = {}) data, _status_code, _headers = get_email_sends_report_with_http_info(campaign_activity_id, opts) data end |
#get_email_sends_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetEmailSendsReport200Response, Integer, Hash)>
GET an Email Sends Report Use this method to get each contact that was sent a specific email campaign activity. This sends report includes general contact data such as the date and time that the email campaign activity was sent to a contact's email address, the contact's first and last name, and unique ID. This report lists the most recent activity first. For more use case information, see [Get an Sends report for an Email Campaign Activity](/api_guide/email_summary_sends_report.html) in the API guide.
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 502 def get_email_sends_report_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_email_sends_report ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailReportingApi.get_email_sends_report" end # resource path local_var_path = '/reports/email_reports/{campaign_activity_id}/tracking/sends'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEmailSendsReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_email_sends_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_email_sends_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_email_stats_report(campaign_ids, opts = {}) ⇒ GetEmailStatsReport200Response
GET an Email Campaign Stats Report Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how. For each ‘campaign_id`, this method returns lists that include total counts (`stats`) for each type of tracked email and relevant campaign-related percentages (`percents`). It also returns the date and time at which the campaign stats were last refreshed. If any specified `campaign_id` is invalid, a 404 error response is returned for all campaigns.
556 557 558 559 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 556 def get_email_stats_report(campaign_ids, opts = {}) data, _status_code, _headers = get_email_stats_report_with_http_info(campaign_ids, opts) data end |
#get_email_stats_report_with_http_info(campaign_ids, opts = {}) ⇒ Array<(GetEmailStatsReport200Response, Integer, Hash)>
GET an Email Campaign Stats Report Use this method to get email campaign performance tracking statistics for one or more campaigns, including the total number of times contacts interacted with your campaigns and how. For each `campaign_id`, this method returns lists that include total counts (`stats`) for each type of tracked email and relevant campaign-related percentages (`percents`). It also returns the date and time at which the campaign stats were last refreshed. If any specified `campaign_id` is invalid, a 404 error response is returned for all campaigns.
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 566 def get_email_stats_report_with_http_info(campaign_ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_email_stats_report ...' end # verify the required parameter 'campaign_ids' is set if @api_client.config.client_side_validation && campaign_ids.nil? fail ArgumentError, "Missing the required parameter 'campaign_ids' when calling EmailReportingApi.get_email_stats_report" end # resource path local_var_path = '/reports/stats/email_campaigns/{campaign_ids}'.sub('{' + 'campaign_ids' + '}', CGI.escape(campaign_ids.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEmailStatsReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_email_stats_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_email_stats_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_forwards_report(campaign_activity_id, opts = {}) ⇒ GetForwardsReport200Response
GET an Email Forwards Report Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer. The report includes general contact information, such as the contact’s email address and unique ID, and the date and time that the email campaign activity was forwarded. Forwards report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Forwards Report](/api_guide/email_summary_forwards_report.html) in the API guide.
620 621 622 623 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 620 def get_forwards_report(campaign_activity_id, opts = {}) data, _status_code, _headers = get_forwards_report_with_http_info(campaign_activity_id, opts) data end |
#get_forwards_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetForwardsReport200Response, Integer, Hash)>
GET an Email Forwards Report Use this method to get a report listing each time a contact forwarded the email campaign activity using the forwarding link in the email footer. The report includes general contact information, such as the contact's email address and unique ID, and the date and time that the email campaign activity was forwarded. Forwards report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Forwards Report](/api_guide/email_summary_forwards_report.html) in the API guide.
631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 631 def get_forwards_report_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_forwards_report ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailReportingApi.get_forwards_report" end # resource path local_var_path = '/reports/email_reports/{campaign_activity_id}/tracking/forwards'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetForwardsReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_forwards_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_forwards_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_optouts_report(campaign_activity_id, opts = {}) ⇒ GetOptoutsReport200Response
GET an Email Opt-outs Report Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account. This report includes contact information, such as the contact’s email address, unique ID, and the opt-out date and time. Opt-out report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Opt-outs Report](/api_guide/email_summary_optouts_report.html) in the API guide.
686 687 688 689 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 686 def get_optouts_report(campaign_activity_id, opts = {}) data, _status_code, _headers = get_optouts_report_with_http_info(campaign_activity_id, opts) data end |
#get_optouts_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetOptoutsReport200Response, Integer, Hash)>
GET an Email Opt-outs Report Use this method to get a report listing each contact that clicked the unsubscribe link in the email campaign activity to opt-out from receiving emails sent from your Constant Contact account. This report includes contact information, such as the contact's email address, unique ID, and the opt-out date and time. Opt-out report data is sorted with the most recent activity listed first. For more use case information, see [Get an Email Opt-outs Report](/api_guide/email_summary_optouts_report.html) in the API guide.
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 697 def get_optouts_report_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_optouts_report ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailReportingApi.get_optouts_report" end # resource path local_var_path = '/reports/email_reports/{campaign_activity_id}/tracking/optouts'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetOptoutsReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_optouts_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_optouts_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_unique_opens_report(campaign_activity_id, opts = {}) ⇒ GetEmailOpensReport200Response
GET an Email Unique Opens Report Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity. This report includes general contact information such as the contact’s email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Unique Opens Report for an Email Campaign Activity](/api_guide/email_summary_unique_opens_report.html) in the API guide.
752 753 754 755 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 752 def get_unique_opens_report(campaign_activity_id, opts = {}) data, _status_code, _headers = get_unique_opens_report_with_http_info(campaign_activity_id, opts) data end |
#get_unique_opens_report_with_http_info(campaign_activity_id, opts = {}) ⇒ Array<(GetEmailOpensReport200Response, Integer, Hash)>
GET an Email Unique Opens Report Use this method to get a unique opens report that provides details about the last time that each contact opened the specified email campaign activity. This report includes general contact information such as the contact's email address and unique ID, the date and time they opened the email campaign activity, and the type of device they used to open it. This report lists the most recent activity first. For more use case information, see [Get an Unique Opens Report for an Email Campaign Activity](/api_guide/email_summary_unique_opens_report.html) in the API guide.
763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 |
# File 'lib/constant_contact_client/api/email_reporting_api.rb', line 763 def get_unique_opens_report_with_http_info(campaign_activity_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EmailReportingApi.get_unique_opens_report ...' end # verify the required parameter 'campaign_activity_id' is set if @api_client.config.client_side_validation && campaign_activity_id.nil? fail ArgumentError, "Missing the required parameter 'campaign_activity_id' when calling EmailReportingApi.get_unique_opens_report" end # resource path local_var_path = '/reports/email_reports/{campaign_activity_id}/tracking/unique_opens'.sub('{' + 'campaign_activity_id' + '}', CGI.escape(campaign_activity_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetEmailOpensReport200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"EmailReportingApi.get_unique_opens_report", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailReportingApi#get_unique_opens_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |