MailchimpMarketing 3.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/MailchimpMarketing.gemspec +45 -0
- data/README.md +378 -0
- data/lib/MailchimpMarketing.rb +162 -0
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +57 -0
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +78 -0
- data/lib/MailchimpMarketing/api/automations_api.rb +351 -0
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +111 -0
- data/lib/MailchimpMarketing/api/batches_api.rb +94 -0
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +111 -0
- data/lib/MailchimpMarketing/api/campaigns_api.rb +414 -0
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +110 -0
- data/lib/MailchimpMarketing/api/conversations_api.rb +124 -0
- data/lib/MailchimpMarketing/api/dashboard_api.rb +128 -0
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +1139 -0
- data/lib/MailchimpMarketing/api/external_auths_api.rb +78 -0
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +66 -0
- data/lib/MailchimpMarketing/api/file_manager_api.rb +224 -0
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +164 -0
- data/lib/MailchimpMarketing/api/lists_api.rb +1302 -0
- data/lib/MailchimpMarketing/api/ping_api.rb +39 -0
- data/lib/MailchimpMarketing/api/postcards_api.rb +45 -0
- data/lib/MailchimpMarketing/api/reporting_api.rb +142 -0
- data/lib/MailchimpMarketing/api/reports_api.rb +464 -0
- data/lib/MailchimpMarketing/api/root_api.rb +41 -0
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +43 -0
- data/lib/MailchimpMarketing/api/search_members_api.rb +44 -0
- data/lib/MailchimpMarketing/api/template_folders_api.rb +111 -0
- data/lib/MailchimpMarketing/api/templates_api.rb +137 -0
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +104 -0
- data/lib/MailchimpMarketing/api_client.rb +214 -0
- data/lib/MailchimpMarketing/api_error.rb +38 -0
- data/lib/MailchimpMarketing/configuration.rb +209 -0
- data/lib/MailchimpMarketing/version.rb +15 -0
- metadata +257 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
=begin
|
2
|
+
#Mailchimp Marketing API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.7
|
7
|
+
Contact: apihelp@mailchimp.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
module MailchimpMarketing
|
17
|
+
class PingApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# Ping
|
25
|
+
def get(opts = {})
|
26
|
+
|
27
|
+
query_params = {}
|
28
|
+
form_params = {}
|
29
|
+
post_body = nil
|
30
|
+
|
31
|
+
local_var_path = '/ping'
|
32
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
33
|
+
:query_params => query_params,
|
34
|
+
:form_params => form_params,
|
35
|
+
:body => post_body)
|
36
|
+
return data, status_code, headers
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
=begin
|
2
|
+
#Mailchimp Marketing API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.7
|
7
|
+
Contact: apihelp@mailchimp.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
module MailchimpMarketing
|
17
|
+
class PostcardsApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# List postcards
|
25
|
+
def get_all(opts = {})
|
26
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
27
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
28
|
+
|
29
|
+
query_params = {}
|
30
|
+
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
31
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
32
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
33
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
34
|
+
form_params = {}
|
35
|
+
post_body = nil
|
36
|
+
|
37
|
+
local_var_path = '/postcards'
|
38
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
39
|
+
:query_params => query_params,
|
40
|
+
:form_params => form_params,
|
41
|
+
:body => post_body)
|
42
|
+
return data, status_code, headers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
=begin
|
2
|
+
#Mailchimp Marketing API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.7
|
7
|
+
Contact: apihelp@mailchimp.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
module MailchimpMarketing
|
17
|
+
class ReportingApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# List reporting resources
|
25
|
+
def info(opts = {})
|
26
|
+
|
27
|
+
query_params = {}
|
28
|
+
form_params = {}
|
29
|
+
post_body = nil
|
30
|
+
|
31
|
+
local_var_path = '/reporting'
|
32
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
33
|
+
:query_params => query_params,
|
34
|
+
:form_params => form_params,
|
35
|
+
:body => post_body)
|
36
|
+
return data, status_code, headers
|
37
|
+
end
|
38
|
+
|
39
|
+
# List facebook ads reports
|
40
|
+
def get_facebook_ads_report_all(opts = {})
|
41
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
42
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of created_at, updated_at, end_time' if opts[:'sort_field'] && !['created_at', 'updated_at', 'end_time'].include?(opts[:'sort_field'])
|
43
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
44
|
+
|
45
|
+
query_params = {}
|
46
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
47
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
48
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
49
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
50
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
51
|
+
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
52
|
+
form_params = {}
|
53
|
+
post_body = nil
|
54
|
+
|
55
|
+
local_var_path = '/reporting/facebook-ads'
|
56
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
57
|
+
:query_params => query_params,
|
58
|
+
:form_params => form_params,
|
59
|
+
:body => post_body)
|
60
|
+
return data, status_code, headers
|
61
|
+
end
|
62
|
+
|
63
|
+
# Get facebook ad report
|
64
|
+
def get_facebook_ad_report(outreach_id, opts = {})
|
65
|
+
fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_id.nil?
|
66
|
+
|
67
|
+
query_params = {}
|
68
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
69
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
70
|
+
form_params = {}
|
71
|
+
post_body = nil
|
72
|
+
|
73
|
+
local_var_path = '/reporting/facebook-ads/{outreach_id}'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)
|
74
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body)
|
78
|
+
return data, status_code, headers
|
79
|
+
end
|
80
|
+
|
81
|
+
# List facebook ecommerce report
|
82
|
+
def get_facebook_ad_product_activity_report(outreach_id, opts = {})
|
83
|
+
fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_id.nil?
|
84
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
85
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of title, total_revenue, total_purchased' if opts[:'sort_field'] && !['title', 'total_revenue', 'total_purchased'].include?(opts[:'sort_field'])
|
86
|
+
|
87
|
+
query_params = {}
|
88
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
89
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
90
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
91
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
92
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
93
|
+
form_params = {}
|
94
|
+
post_body = nil
|
95
|
+
|
96
|
+
local_var_path = '/reporting/facebook-ads/{outreach_id}/ecommerce-product-activity'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)
|
97
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
98
|
+
:query_params => query_params,
|
99
|
+
:form_params => form_params,
|
100
|
+
:body => post_body)
|
101
|
+
return data, status_code, headers
|
102
|
+
end
|
103
|
+
|
104
|
+
# List landing pages reports
|
105
|
+
def get_landing_page_reports_all(opts = {})
|
106
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
107
|
+
|
108
|
+
query_params = {}
|
109
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
110
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
111
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
112
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
113
|
+
form_params = {}
|
114
|
+
post_body = nil
|
115
|
+
|
116
|
+
local_var_path = '/reporting/landing-pages'
|
117
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
118
|
+
:query_params => query_params,
|
119
|
+
:form_params => form_params,
|
120
|
+
:body => post_body)
|
121
|
+
return data, status_code, headers
|
122
|
+
end
|
123
|
+
|
124
|
+
# Get landing page report
|
125
|
+
def get_landing_page_report(outreach_id, opts = {})
|
126
|
+
fail ArgumentError, "Missing required param: 'outreach_id'" if outreach_id.nil?
|
127
|
+
|
128
|
+
query_params = {}
|
129
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
130
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
131
|
+
form_params = {}
|
132
|
+
post_body = nil
|
133
|
+
|
134
|
+
local_var_path = '/reporting/landing-pages/{outreach_id}'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)
|
135
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
136
|
+
:query_params => query_params,
|
137
|
+
:form_params => form_params,
|
138
|
+
:body => post_body)
|
139
|
+
return data, status_code, headers
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
@@ -0,0 +1,464 @@
|
|
1
|
+
=begin
|
2
|
+
#Mailchimp Marketing API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 3.0.7
|
7
|
+
Contact: apihelp@mailchimp.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'uri'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
module MailchimpMarketing
|
17
|
+
class ReportsApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# List campaign reports
|
25
|
+
def get_all_campaign_reports(opts = {})
|
26
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
27
|
+
fail ArgumentError, 'invalid value for "type", must be one of regular, plaintext, absplit, rss, variate' if opts[:'type'] && !['regular', 'plaintext', 'absplit', 'rss', 'variate'].include?(opts[:'type'])
|
28
|
+
|
29
|
+
query_params = {}
|
30
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
31
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
32
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
33
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
34
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
35
|
+
query_params[:'before_send_time'] = opts[:'before_send_time'] if !opts[:'before_send_time'].nil?
|
36
|
+
query_params[:'since_send_time'] = opts[:'since_send_time'] if !opts[:'since_send_time'].nil?
|
37
|
+
form_params = {}
|
38
|
+
post_body = nil
|
39
|
+
|
40
|
+
local_var_path = '/reports'
|
41
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
42
|
+
:query_params => query_params,
|
43
|
+
:form_params => form_params,
|
44
|
+
:body => post_body)
|
45
|
+
return data, status_code, headers
|
46
|
+
end
|
47
|
+
|
48
|
+
# Get campaign report
|
49
|
+
def get_campaign_report(campaign_id, opts = {})
|
50
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
51
|
+
|
52
|
+
query_params = {}
|
53
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
54
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
55
|
+
form_params = {}
|
56
|
+
post_body = nil
|
57
|
+
|
58
|
+
local_var_path = '/reports/{campaign_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
59
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
60
|
+
:query_params => query_params,
|
61
|
+
:form_params => form_params,
|
62
|
+
:body => post_body)
|
63
|
+
return data, status_code, headers
|
64
|
+
end
|
65
|
+
|
66
|
+
# List abuse reports
|
67
|
+
def get_campaign_abuse_reports(campaign_id, opts = {})
|
68
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
69
|
+
|
70
|
+
query_params = {}
|
71
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
72
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
73
|
+
form_params = {}
|
74
|
+
post_body = nil
|
75
|
+
|
76
|
+
local_var_path = '/reports/{campaign_id}/abuse-reports'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
77
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
78
|
+
:query_params => query_params,
|
79
|
+
:form_params => form_params,
|
80
|
+
:body => post_body)
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# Get abuse report
|
85
|
+
def get_campaign_abuse_report(campaign_id, report_id, opts = {})
|
86
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
87
|
+
fail ArgumentError, "Missing required param: 'report_id'" if report_id.nil?
|
88
|
+
|
89
|
+
query_params = {}
|
90
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
91
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
92
|
+
form_params = {}
|
93
|
+
post_body = nil
|
94
|
+
|
95
|
+
local_var_path = '/reports/{campaign_id}/abuse-reports/{report_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'report_id' + '}', report_id.to_s)
|
96
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
97
|
+
:query_params => query_params,
|
98
|
+
:form_params => form_params,
|
99
|
+
:body => post_body)
|
100
|
+
return data, status_code, headers
|
101
|
+
end
|
102
|
+
|
103
|
+
# List campaign feedback
|
104
|
+
def get_campaign_advice(campaign_id, opts = {})
|
105
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
106
|
+
|
107
|
+
query_params = {}
|
108
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
109
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
110
|
+
form_params = {}
|
111
|
+
post_body = nil
|
112
|
+
|
113
|
+
local_var_path = '/reports/{campaign_id}/advice'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
114
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
115
|
+
:query_params => query_params,
|
116
|
+
:form_params => form_params,
|
117
|
+
:body => post_body)
|
118
|
+
return data, status_code, headers
|
119
|
+
end
|
120
|
+
|
121
|
+
# List campaign details
|
122
|
+
def get_campaign_click_details(campaign_id, opts = {})
|
123
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
124
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
125
|
+
|
126
|
+
query_params = {}
|
127
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
128
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
129
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
130
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
131
|
+
form_params = {}
|
132
|
+
post_body = nil
|
133
|
+
|
134
|
+
local_var_path = '/reports/{campaign_id}/click-details'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
135
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
136
|
+
:query_params => query_params,
|
137
|
+
:form_params => form_params,
|
138
|
+
:body => post_body)
|
139
|
+
return data, status_code, headers
|
140
|
+
end
|
141
|
+
|
142
|
+
# Get campaign link details
|
143
|
+
def get_campaign_click_details_for_link(campaign_id, link_id, opts = {})
|
144
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
145
|
+
fail ArgumentError, "Missing required param: 'link_id'" if link_id.nil?
|
146
|
+
|
147
|
+
query_params = {}
|
148
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
149
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
150
|
+
form_params = {}
|
151
|
+
post_body = nil
|
152
|
+
|
153
|
+
local_var_path = '/reports/{campaign_id}/click-details/{link_id}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s)
|
154
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
155
|
+
:query_params => query_params,
|
156
|
+
:form_params => form_params,
|
157
|
+
:body => post_body)
|
158
|
+
return data, status_code, headers
|
159
|
+
end
|
160
|
+
|
161
|
+
# List clicked link subscribers
|
162
|
+
def get_subscribers_info(campaign_id, link_id, opts = {})
|
163
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
164
|
+
fail ArgumentError, "Missing required param: 'link_id'" if link_id.nil?
|
165
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
166
|
+
|
167
|
+
query_params = {}
|
168
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
169
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
170
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
171
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
172
|
+
form_params = {}
|
173
|
+
post_body = nil
|
174
|
+
|
175
|
+
local_var_path = '/reports/{campaign_id}/click-details/{link_id}/members'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s)
|
176
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
177
|
+
:query_params => query_params,
|
178
|
+
:form_params => form_params,
|
179
|
+
:body => post_body)
|
180
|
+
return data, status_code, headers
|
181
|
+
end
|
182
|
+
|
183
|
+
# Get clicked link subscriber
|
184
|
+
def get_subscriber_info(campaign_id, link_id, subscriber_hash, opts = {})
|
185
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
186
|
+
fail ArgumentError, "Missing required param: 'link_id'" if link_id.nil?
|
187
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
188
|
+
|
189
|
+
query_params = {}
|
190
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
191
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
192
|
+
form_params = {}
|
193
|
+
post_body = nil
|
194
|
+
|
195
|
+
local_var_path = '/reports/{campaign_id}/click-details/{link_id}/members/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'link_id' + '}', link_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
196
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
197
|
+
:query_params => query_params,
|
198
|
+
:form_params => form_params,
|
199
|
+
:body => post_body)
|
200
|
+
return data, status_code, headers
|
201
|
+
end
|
202
|
+
|
203
|
+
# List domain performance stats
|
204
|
+
def get_domain_performance_for_campaign(campaign_id, opts = {})
|
205
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
206
|
+
|
207
|
+
query_params = {}
|
208
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
209
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
210
|
+
form_params = {}
|
211
|
+
post_body = nil
|
212
|
+
|
213
|
+
local_var_path = '/reports/{campaign_id}/domain-performance'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
214
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
215
|
+
:query_params => query_params,
|
216
|
+
:form_params => form_params,
|
217
|
+
:body => post_body)
|
218
|
+
return data, status_code, headers
|
219
|
+
end
|
220
|
+
|
221
|
+
# List campaign product activity
|
222
|
+
def get_ecommerce_product_activity_for_campaign(campaign_id, opts = {})
|
223
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
224
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
225
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of title, total_revenue, total_purchased' if opts[:'sort_field'] && !['title', 'total_revenue', 'total_purchased'].include?(opts[:'sort_field'])
|
226
|
+
|
227
|
+
query_params = {}
|
228
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
229
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
230
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
231
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
232
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
233
|
+
form_params = {}
|
234
|
+
post_body = nil
|
235
|
+
|
236
|
+
local_var_path = '/reports/{campaign_id}/ecommerce-product-activity'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
237
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
238
|
+
:query_params => query_params,
|
239
|
+
:form_params => form_params,
|
240
|
+
:body => post_body)
|
241
|
+
return data, status_code, headers
|
242
|
+
end
|
243
|
+
|
244
|
+
# List eep url activity
|
245
|
+
def get_eepurl_activity_for_campaign(campaign_id, opts = {})
|
246
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
247
|
+
|
248
|
+
query_params = {}
|
249
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
250
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
251
|
+
form_params = {}
|
252
|
+
post_body = nil
|
253
|
+
|
254
|
+
local_var_path = '/reports/{campaign_id}/eepurl'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
255
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
256
|
+
:query_params => query_params,
|
257
|
+
:form_params => form_params,
|
258
|
+
:body => post_body)
|
259
|
+
return data, status_code, headers
|
260
|
+
end
|
261
|
+
|
262
|
+
# List email activity
|
263
|
+
def get_email_activity_for_campaign(campaign_id, opts = {})
|
264
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
265
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
266
|
+
|
267
|
+
query_params = {}
|
268
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
269
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
270
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
271
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
272
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
273
|
+
form_params = {}
|
274
|
+
post_body = nil
|
275
|
+
|
276
|
+
local_var_path = '/reports/{campaign_id}/email-activity'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
277
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
278
|
+
:query_params => query_params,
|
279
|
+
:form_params => form_params,
|
280
|
+
:body => post_body)
|
281
|
+
return data, status_code, headers
|
282
|
+
end
|
283
|
+
|
284
|
+
# Get subscriber email activity
|
285
|
+
def get_email_activity_for_subscriber(campaign_id, subscriber_hash, opts = {})
|
286
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
287
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
288
|
+
|
289
|
+
query_params = {}
|
290
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
291
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
292
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
293
|
+
form_params = {}
|
294
|
+
post_body = nil
|
295
|
+
|
296
|
+
local_var_path = '/reports/{campaign_id}/email-activity/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
297
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
298
|
+
:query_params => query_params,
|
299
|
+
:form_params => form_params,
|
300
|
+
:body => post_body)
|
301
|
+
return data, status_code, headers
|
302
|
+
end
|
303
|
+
|
304
|
+
# List top open activities
|
305
|
+
def get_locations_for_campaign(campaign_id, opts = {})
|
306
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
307
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
308
|
+
|
309
|
+
query_params = {}
|
310
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
311
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
312
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
313
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
314
|
+
form_params = {}
|
315
|
+
post_body = nil
|
316
|
+
|
317
|
+
local_var_path = '/reports/{campaign_id}/locations'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
318
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
319
|
+
:query_params => query_params,
|
320
|
+
:form_params => form_params,
|
321
|
+
:body => post_body)
|
322
|
+
return data, status_code, headers
|
323
|
+
end
|
324
|
+
|
325
|
+
# List campaign open details
|
326
|
+
def get_campaign_open_details(campaign_id, opts = {})
|
327
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
328
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
329
|
+
|
330
|
+
query_params = {}
|
331
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
332
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
333
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
334
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
335
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
336
|
+
form_params = {}
|
337
|
+
post_body = nil
|
338
|
+
|
339
|
+
local_var_path = '/reports/{campaign_id}/open-details'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
340
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
341
|
+
:query_params => query_params,
|
342
|
+
:form_params => form_params,
|
343
|
+
:body => post_body)
|
344
|
+
return data, status_code, headers
|
345
|
+
end
|
346
|
+
|
347
|
+
# Get opened campaign subscriber
|
348
|
+
def get_subscriber_info_for_opened_campaign(campaign_id, subscriber_hash, opts = {})
|
349
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
350
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
351
|
+
|
352
|
+
query_params = {}
|
353
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
354
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
355
|
+
form_params = {}
|
356
|
+
post_body = nil
|
357
|
+
|
358
|
+
local_var_path = '/reports/{campaign_id}/open-details/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
359
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
360
|
+
:query_params => query_params,
|
361
|
+
:form_params => form_params,
|
362
|
+
:body => post_body)
|
363
|
+
return data, status_code, headers
|
364
|
+
end
|
365
|
+
|
366
|
+
# List campaign recipients
|
367
|
+
def get_campaign_recipients(campaign_id, opts = {})
|
368
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
369
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
370
|
+
|
371
|
+
query_params = {}
|
372
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
373
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
374
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
375
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
376
|
+
form_params = {}
|
377
|
+
post_body = nil
|
378
|
+
|
379
|
+
local_var_path = '/reports/{campaign_id}/sent-to'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
380
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
381
|
+
:query_params => query_params,
|
382
|
+
:form_params => form_params,
|
383
|
+
:body => post_body)
|
384
|
+
return data, status_code, headers
|
385
|
+
end
|
386
|
+
|
387
|
+
# Get campaign recipient info
|
388
|
+
def get_campaign_recipient(campaign_id, subscriber_hash, opts = {})
|
389
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
390
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
391
|
+
|
392
|
+
query_params = {}
|
393
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
394
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
395
|
+
form_params = {}
|
396
|
+
post_body = nil
|
397
|
+
|
398
|
+
local_var_path = '/reports/{campaign_id}/sent-to/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
399
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
400
|
+
:query_params => query_params,
|
401
|
+
:form_params => form_params,
|
402
|
+
:body => post_body)
|
403
|
+
return data, status_code, headers
|
404
|
+
end
|
405
|
+
|
406
|
+
# List child campaign reports
|
407
|
+
def get_sub_reports_for_campaign(campaign_id, opts = {})
|
408
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
409
|
+
|
410
|
+
query_params = {}
|
411
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
412
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
413
|
+
form_params = {}
|
414
|
+
post_body = nil
|
415
|
+
|
416
|
+
local_var_path = '/reports/{campaign_id}/sub-reports'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
417
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
418
|
+
:query_params => query_params,
|
419
|
+
:form_params => form_params,
|
420
|
+
:body => post_body)
|
421
|
+
return data, status_code, headers
|
422
|
+
end
|
423
|
+
|
424
|
+
# List unsubscribed members
|
425
|
+
def get_unsubscribed_list_for_campaign(campaign_id, opts = {})
|
426
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
427
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
428
|
+
|
429
|
+
query_params = {}
|
430
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
431
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
432
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
433
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
434
|
+
form_params = {}
|
435
|
+
post_body = nil
|
436
|
+
|
437
|
+
local_var_path = '/reports/{campaign_id}/unsubscribed'.sub('{' + 'campaign_id' + '}', campaign_id.to_s)
|
438
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
439
|
+
:query_params => query_params,
|
440
|
+
:form_params => form_params,
|
441
|
+
:body => post_body)
|
442
|
+
return data, status_code, headers
|
443
|
+
end
|
444
|
+
|
445
|
+
# Get unsubscribed member
|
446
|
+
def get_unsubscribed_list_member(campaign_id, subscriber_hash, opts = {})
|
447
|
+
fail ArgumentError, "Missing required param: 'campaign_id'" if campaign_id.nil?
|
448
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
449
|
+
|
450
|
+
query_params = {}
|
451
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
452
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
453
|
+
form_params = {}
|
454
|
+
post_body = nil
|
455
|
+
|
456
|
+
local_var_path = '/reports/{campaign_id}/unsubscribed/{subscriber_hash}'.sub('{' + 'campaign_id' + '}', campaign_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
457
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
458
|
+
:query_params => query_params,
|
459
|
+
:form_params => form_params,
|
460
|
+
:body => post_body)
|
461
|
+
return data, status_code, headers
|
462
|
+
end
|
463
|
+
end
|
464
|
+
end
|