MailchimpMarketing 3.0.12 → 3.0.80
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +62 -0
- data/MailchimpMarketing.gemspec +6 -6
- data/README.md +33 -29
- data/lib/MailchimpMarketing/api/account_export_api.rb +39 -0
- data/lib/MailchimpMarketing/api/{postcards_api.rb → account_exports_api.rb} +20 -7
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +1 -14
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +1 -15
- data/lib/MailchimpMarketing/api/automations_api.rb +6 -18
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +1 -1
- data/lib/MailchimpMarketing/api/batches_api.rb +1 -1
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +1 -1
- data/lib/MailchimpMarketing/api/campaigns_api.rb +1 -1
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +1 -1
- data/lib/MailchimpMarketing/api/conversations_api.rb +1 -16
- data/lib/MailchimpMarketing/api/customer_journeys_api.rb +39 -0
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +1 -16
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +1 -1
- data/lib/MailchimpMarketing/api/file_manager_api.rb +1 -14
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +2 -1
- data/lib/MailchimpMarketing/api/lists_api.rb +64 -55
- data/lib/MailchimpMarketing/api/ping_api.rb +1 -1
- data/lib/MailchimpMarketing/api/reporting_api.rb +122 -14
- data/lib/MailchimpMarketing/api/reports_api.rb +2 -2
- data/lib/MailchimpMarketing/api/root_api.rb +1 -1
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +1 -1
- data/lib/MailchimpMarketing/api/search_members_api.rb +1 -1
- data/lib/MailchimpMarketing/api/surveys_api.rb +53 -0
- data/lib/MailchimpMarketing/api/template_folders_api.rb +1 -1
- data/lib/MailchimpMarketing/api/templates_api.rb +6 -4
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +1 -1
- data/lib/MailchimpMarketing/api_client.rb +18 -5
- data/lib/MailchimpMarketing/api_error.rb +1 -1
- data/lib/MailchimpMarketing/configuration.rb +1 -1
- data/lib/MailchimpMarketing/version.rb +2 -2
- data/lib/MailchimpMarketing.rb +20 -15
- metadata +19 -11
- data/lib/MailchimpMarketing/api/dashboard_api.rb +0 -115
- data/lib/MailchimpMarketing/api/external_auths_api.rb +0 -71
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.80
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -37,7 +37,8 @@ module MailchimpMarketing
|
|
37
37
|
# List templates
|
38
38
|
def list(opts = {})
|
39
39
|
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
40
|
-
fail ArgumentError, 'invalid value for "sort_field", must be one of date_created, name' if opts[:'sort_field'] && !['date_created', 'name'].include?(opts[:'sort_field'])
|
40
|
+
fail ArgumentError, 'invalid value for "sort_field", must be one of date_created, date_edited, name' if opts[:'sort_field'] && !['date_created', 'date_edited', 'name'].include?(opts[:'sort_field'])
|
41
|
+
fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir'])
|
41
42
|
|
42
43
|
query_params = {}
|
43
44
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
@@ -45,12 +46,13 @@ module MailchimpMarketing
|
|
45
46
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
46
47
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
47
48
|
query_params[:'created_by'] = opts[:'created_by'] if !opts[:'created_by'].nil?
|
48
|
-
query_params[:'
|
49
|
-
query_params[:'
|
49
|
+
query_params[:'since_date_created'] = opts[:'since_date_created'] if !opts[:'since_date_created'].nil?
|
50
|
+
query_params[:'before_date_created'] = opts[:'before_date_created'] if !opts[:'before_date_created'].nil?
|
50
51
|
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
51
52
|
query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil?
|
52
53
|
query_params[:'folder_id'] = opts[:'folder_id'] if !opts[:'folder_id'].nil?
|
53
54
|
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
55
|
+
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
54
56
|
post_body = nil
|
55
57
|
|
56
58
|
local_var_path = '/templates'
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.80
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -3,13 +3,14 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.80
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
|
+
require 'base64'
|
13
14
|
require 'json'
|
14
15
|
require 'excon'
|
15
16
|
|
@@ -51,20 +52,25 @@ module MailchimpMarketing
|
|
51
52
|
if @server == 'invalid-server' && @is_basic_auth
|
52
53
|
@server = get_server_from_api_key(@api_key)
|
53
54
|
end
|
55
|
+
|
56
|
+
timeout = config[:timeout] || 120
|
57
|
+
@write_timeout = config[:write_timeout] || timeout
|
58
|
+
@read_timeout = config[:read_timeout] || timeout
|
59
|
+
@connect_timeout = config[:connect_timeout] || timeout
|
54
60
|
end
|
55
61
|
|
56
62
|
def call_api(http_method, path, opts = {})
|
57
63
|
headers = {'Content-Type' => "application/json"}
|
58
|
-
headers[:Authorization] = "Basic #{@api_key}" if @is_basic_auth
|
64
|
+
headers[:Authorization] = "Basic #{encoded_basic_token(@api_key)}" if @is_basic_auth
|
59
65
|
headers[:Authorization] = "Bearer #@access_token" if @is_oauth
|
60
66
|
|
61
67
|
host = @server.length > 0 ? @host.sub('server', @server) : @host
|
62
|
-
conn = Excon.new(host + path, :headers => headers)
|
68
|
+
conn = Excon.new(host + path, :headers => headers, :read_timeout => @read_timeout, :write_timeout => @write_timeout, :connect_timeout => @connect_timeout)
|
63
69
|
|
64
70
|
res = nil
|
65
71
|
case http_method.to_sym.downcase
|
66
|
-
when :post, :put, :delete
|
67
|
-
res = conn.request(:method => http_method, :body => opts[:body])
|
72
|
+
when :post, :put, :patch, :delete
|
73
|
+
res = conn.request(:method => http_method, :query => opts[:query_params], :body => opts[:body])
|
68
74
|
when :get
|
69
75
|
res = conn.get(:query => opts[:query_params])
|
70
76
|
end
|
@@ -118,5 +124,12 @@ module MailchimpMarketing
|
|
118
124
|
fail "unknown collection format: #{collection_format.inspect}"
|
119
125
|
end
|
120
126
|
end
|
127
|
+
|
128
|
+
private
|
129
|
+
|
130
|
+
# Build base64 encoded token for basic auth.
|
131
|
+
def encoded_basic_token(api_key)
|
132
|
+
Base64.urlsafe_encode64("user:#{api_key}")
|
133
|
+
end
|
121
134
|
end
|
122
135
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.80
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.80
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.80
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.12
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module MailchimpMarketing
|
14
|
-
VERSION = '3.0.
|
14
|
+
VERSION = '3.0.80'
|
15
15
|
end
|
data/lib/MailchimpMarketing.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.80
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -16,6 +16,8 @@ require 'MailchimpMarketing/api_error'
|
|
16
16
|
require 'MailchimpMarketing/version'
|
17
17
|
|
18
18
|
# APIs
|
19
|
+
require 'MailchimpMarketing/api/account_export_api'
|
20
|
+
require 'MailchimpMarketing/api/account_exports_api'
|
19
21
|
require 'MailchimpMarketing/api/activity_feed_api'
|
20
22
|
require 'MailchimpMarketing/api/authorized_apps_api'
|
21
23
|
require 'MailchimpMarketing/api/automations_api'
|
@@ -25,20 +27,19 @@ require 'MailchimpMarketing/api/campaign_folders_api'
|
|
25
27
|
require 'MailchimpMarketing/api/campaigns_api'
|
26
28
|
require 'MailchimpMarketing/api/connected_sites_api'
|
27
29
|
require 'MailchimpMarketing/api/conversations_api'
|
28
|
-
require 'MailchimpMarketing/api/
|
30
|
+
require 'MailchimpMarketing/api/customer_journeys_api'
|
29
31
|
require 'MailchimpMarketing/api/ecommerce_api'
|
30
|
-
require 'MailchimpMarketing/api/external_auths_api'
|
31
32
|
require 'MailchimpMarketing/api/facebook_ads_api'
|
32
33
|
require 'MailchimpMarketing/api/file_manager_api'
|
33
34
|
require 'MailchimpMarketing/api/landing_pages_api'
|
34
35
|
require 'MailchimpMarketing/api/lists_api'
|
35
36
|
require 'MailchimpMarketing/api/ping_api'
|
36
|
-
require 'MailchimpMarketing/api/postcards_api'
|
37
37
|
require 'MailchimpMarketing/api/reporting_api'
|
38
38
|
require 'MailchimpMarketing/api/reports_api'
|
39
39
|
require 'MailchimpMarketing/api/root_api'
|
40
40
|
require 'MailchimpMarketing/api/search_campaigns_api'
|
41
41
|
require 'MailchimpMarketing/api/search_members_api'
|
42
|
+
require 'MailchimpMarketing/api/surveys_api'
|
42
43
|
require 'MailchimpMarketing/api/template_folders_api'
|
43
44
|
require 'MailchimpMarketing/api/templates_api'
|
44
45
|
require 'MailchimpMarketing/api/verified_domains_api'
|
@@ -48,6 +49,8 @@ module MailchimpMarketing
|
|
48
49
|
def initialize(config = {})
|
49
50
|
@api_client = ApiClient.new(config)
|
50
51
|
|
52
|
+
@AccountExport = AccountExportApi.new(@api_client)
|
53
|
+
@AccountExports = AccountExportsApi.new(@api_client)
|
51
54
|
@ActivityFeed = ActivityFeedApi.new(@api_client)
|
52
55
|
@AuthorizedApps = AuthorizedAppsApi.new(@api_client)
|
53
56
|
@Automations = AutomationsApi.new(@api_client)
|
@@ -57,20 +60,19 @@ module MailchimpMarketing
|
|
57
60
|
@Campaigns = CampaignsApi.new(@api_client)
|
58
61
|
@ConnectedSites = ConnectedSitesApi.new(@api_client)
|
59
62
|
@Conversations = ConversationsApi.new(@api_client)
|
60
|
-
@
|
63
|
+
@CustomerJourneys = CustomerJourneysApi.new(@api_client)
|
61
64
|
@Ecommerce = EcommerceApi.new(@api_client)
|
62
|
-
@ExternalAuths = ExternalAuthsApi.new(@api_client)
|
63
65
|
@FacebookAds = FacebookAdsApi.new(@api_client)
|
64
66
|
@FileManager = FileManagerApi.new(@api_client)
|
65
67
|
@LandingPages = LandingPagesApi.new(@api_client)
|
66
68
|
@Lists = ListsApi.new(@api_client)
|
67
69
|
@Ping = PingApi.new(@api_client)
|
68
|
-
@Postcards = PostcardsApi.new(@api_client)
|
69
70
|
@Reporting = ReportingApi.new(@api_client)
|
70
71
|
@Reports = ReportsApi.new(@api_client)
|
71
72
|
@Root = RootApi.new(@api_client)
|
72
73
|
@SearchCampaigns = SearchCampaignsApi.new(@api_client)
|
73
74
|
@SearchMembers = SearchMembersApi.new(@api_client)
|
75
|
+
@Surveys = SurveysApi.new(@api_client)
|
74
76
|
@TemplateFolders = TemplateFoldersApi.new(@api_client)
|
75
77
|
@Templates = TemplatesApi.new(@api_client)
|
76
78
|
@VerifiedDomains = VerifiedDomainsApi.new(@api_client)
|
@@ -80,6 +82,12 @@ module MailchimpMarketing
|
|
80
82
|
@api_client.set_config(config)
|
81
83
|
end
|
82
84
|
|
85
|
+
def accountExport
|
86
|
+
@AccountExport
|
87
|
+
end
|
88
|
+
def accountExports
|
89
|
+
@AccountExports
|
90
|
+
end
|
83
91
|
def activityFeed
|
84
92
|
@ActivityFeed
|
85
93
|
end
|
@@ -107,15 +115,12 @@ module MailchimpMarketing
|
|
107
115
|
def conversations
|
108
116
|
@Conversations
|
109
117
|
end
|
110
|
-
def
|
111
|
-
@
|
118
|
+
def customerJourneys
|
119
|
+
@CustomerJourneys
|
112
120
|
end
|
113
121
|
def ecommerce
|
114
122
|
@Ecommerce
|
115
123
|
end
|
116
|
-
def externalAuths
|
117
|
-
@ExternalAuths
|
118
|
-
end
|
119
124
|
def facebookAds
|
120
125
|
@FacebookAds
|
121
126
|
end
|
@@ -131,9 +136,6 @@ module MailchimpMarketing
|
|
131
136
|
def ping
|
132
137
|
@Ping
|
133
138
|
end
|
134
|
-
def postcards
|
135
|
-
@Postcards
|
136
|
-
end
|
137
139
|
def reporting
|
138
140
|
@Reporting
|
139
141
|
end
|
@@ -149,6 +151,9 @@ module MailchimpMarketing
|
|
149
151
|
def searchMembers
|
150
152
|
@SearchMembers
|
151
153
|
end
|
154
|
+
def surveys
|
155
|
+
@Surveys
|
156
|
+
end
|
152
157
|
def templateFolders
|
153
158
|
@TemplateFolders
|
154
159
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: MailchimpMarketing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.80
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Mailchimp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.76.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 0.76.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: json
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,18 +190,21 @@ dependencies:
|
|
184
190
|
- - ">="
|
185
191
|
- !ruby/object:Gem::Version
|
186
192
|
version: 0.2.12
|
187
|
-
description: Mailchimp Marketing
|
193
|
+
description: The official Ruby client library for the Mailchimp Marketing API
|
188
194
|
email:
|
189
195
|
- apihelp@mailchimp.com
|
190
196
|
executables: []
|
191
197
|
extensions: []
|
192
198
|
extra_rdoc_files: []
|
193
199
|
files:
|
200
|
+
- CHANGELOG.md
|
194
201
|
- Gemfile
|
195
202
|
- LICENSE
|
196
203
|
- MailchimpMarketing.gemspec
|
197
204
|
- README.md
|
198
205
|
- lib/MailchimpMarketing.rb
|
206
|
+
- lib/MailchimpMarketing/api/account_export_api.rb
|
207
|
+
- lib/MailchimpMarketing/api/account_exports_api.rb
|
199
208
|
- lib/MailchimpMarketing/api/activity_feed_api.rb
|
200
209
|
- lib/MailchimpMarketing/api/authorized_apps_api.rb
|
201
210
|
- lib/MailchimpMarketing/api/automations_api.rb
|
@@ -205,20 +214,19 @@ files:
|
|
205
214
|
- lib/MailchimpMarketing/api/campaigns_api.rb
|
206
215
|
- lib/MailchimpMarketing/api/connected_sites_api.rb
|
207
216
|
- lib/MailchimpMarketing/api/conversations_api.rb
|
208
|
-
- lib/MailchimpMarketing/api/
|
217
|
+
- lib/MailchimpMarketing/api/customer_journeys_api.rb
|
209
218
|
- lib/MailchimpMarketing/api/ecommerce_api.rb
|
210
|
-
- lib/MailchimpMarketing/api/external_auths_api.rb
|
211
219
|
- lib/MailchimpMarketing/api/facebook_ads_api.rb
|
212
220
|
- lib/MailchimpMarketing/api/file_manager_api.rb
|
213
221
|
- lib/MailchimpMarketing/api/landing_pages_api.rb
|
214
222
|
- lib/MailchimpMarketing/api/lists_api.rb
|
215
223
|
- lib/MailchimpMarketing/api/ping_api.rb
|
216
|
-
- lib/MailchimpMarketing/api/postcards_api.rb
|
217
224
|
- lib/MailchimpMarketing/api/reporting_api.rb
|
218
225
|
- lib/MailchimpMarketing/api/reports_api.rb
|
219
226
|
- lib/MailchimpMarketing/api/root_api.rb
|
220
227
|
- lib/MailchimpMarketing/api/search_campaigns_api.rb
|
221
228
|
- lib/MailchimpMarketing/api/search_members_api.rb
|
229
|
+
- lib/MailchimpMarketing/api/surveys_api.rb
|
222
230
|
- lib/MailchimpMarketing/api/template_folders_api.rb
|
223
231
|
- lib/MailchimpMarketing/api/templates_api.rb
|
224
232
|
- lib/MailchimpMarketing/api/verified_domains_api.rb
|
@@ -226,7 +234,7 @@ files:
|
|
226
234
|
- lib/MailchimpMarketing/api_error.rb
|
227
235
|
- lib/MailchimpMarketing/configuration.rb
|
228
236
|
- lib/MailchimpMarketing/version.rb
|
229
|
-
homepage: https://github.com/
|
237
|
+
homepage: https://github.com/mailchimp/mailchimp-client-lib-codegen
|
230
238
|
licenses:
|
231
239
|
- Apache-2.0
|
232
240
|
metadata: {}
|
@@ -245,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
253
|
- !ruby/object:Gem::Version
|
246
254
|
version: '0'
|
247
255
|
requirements: []
|
248
|
-
rubygems_version: 3.0.3
|
256
|
+
rubygems_version: 3.0.3.1
|
249
257
|
signing_key:
|
250
258
|
specification_version: 4
|
251
259
|
summary: Mailchimp Marketing API Ruby Gem
|
@@ -1,115 +0,0 @@
|
|
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.12
|
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
|
-
|
15
|
-
module MailchimpMarketing
|
16
|
-
class DashboardApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
|
23
|
-
# List dashboard ads
|
24
|
-
def ads(opts = {})
|
25
|
-
|
26
|
-
query_params = {}
|
27
|
-
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
28
|
-
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
29
|
-
query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
|
30
|
-
query_params[:'num'] = opts[:'num'] if !opts[:'num'].nil?
|
31
|
-
post_body = nil
|
32
|
-
|
33
|
-
local_var_path = '/dashboard/ads'
|
34
|
-
data = @api_client.call_api(:GET, local_var_path,
|
35
|
-
:query_params => query_params,
|
36
|
-
:body => post_body)
|
37
|
-
return data
|
38
|
-
end
|
39
|
-
|
40
|
-
# List dashboard audiences
|
41
|
-
def audiences(opts = {})
|
42
|
-
|
43
|
-
query_params = {}
|
44
|
-
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
45
|
-
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
46
|
-
post_body = nil
|
47
|
-
|
48
|
-
local_var_path = '/dashboard/audiences'
|
49
|
-
data = @api_client.call_api(:GET, local_var_path,
|
50
|
-
:query_params => query_params,
|
51
|
-
:body => post_body)
|
52
|
-
return data
|
53
|
-
end
|
54
|
-
|
55
|
-
# List dashboard charts
|
56
|
-
def charts(opts = {})
|
57
|
-
|
58
|
-
query_params = {}
|
59
|
-
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
60
|
-
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
61
|
-
post_body = nil
|
62
|
-
|
63
|
-
local_var_path = '/dashboard/charts'
|
64
|
-
data = @api_client.call_api(:GET, local_var_path,
|
65
|
-
:query_params => query_params,
|
66
|
-
:body => post_body)
|
67
|
-
return data
|
68
|
-
end
|
69
|
-
|
70
|
-
# List dashboard ecommerce info
|
71
|
-
def ecommerce(opts = {})
|
72
|
-
|
73
|
-
query_params = {}
|
74
|
-
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
75
|
-
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
76
|
-
post_body = nil
|
77
|
-
|
78
|
-
local_var_path = '/dashboard/ecommerce'
|
79
|
-
data = @api_client.call_api(:GET, local_var_path,
|
80
|
-
:query_params => query_params,
|
81
|
-
:body => post_body)
|
82
|
-
return data
|
83
|
-
end
|
84
|
-
|
85
|
-
# List dashboard engagement info
|
86
|
-
def engagement(opts = {})
|
87
|
-
|
88
|
-
query_params = {}
|
89
|
-
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
90
|
-
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
91
|
-
post_body = nil
|
92
|
-
|
93
|
-
local_var_path = '/dashboard/engagement'
|
94
|
-
data = @api_client.call_api(:GET, local_var_path,
|
95
|
-
:query_params => query_params,
|
96
|
-
:body => post_body)
|
97
|
-
return data
|
98
|
-
end
|
99
|
-
|
100
|
-
# List dashboard homepage metrics
|
101
|
-
def homepage(opts = {})
|
102
|
-
|
103
|
-
query_params = {}
|
104
|
-
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
105
|
-
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
106
|
-
post_body = nil
|
107
|
-
|
108
|
-
local_var_path = '/dashboard/homepage'
|
109
|
-
data = @api_client.call_api(:GET, local_var_path,
|
110
|
-
:query_params => query_params,
|
111
|
-
:body => post_body)
|
112
|
-
return data
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
@@ -1,71 +0,0 @@
|
|
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.12
|
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
|
-
|
15
|
-
module MailchimpMarketing
|
16
|
-
class ExternalAuthsApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
|
23
|
-
# Get external authentication
|
24
|
-
def get(system_id, opts = {})
|
25
|
-
fail ArgumentError, "Missing required param: 'system_id'" if system_id.nil?
|
26
|
-
|
27
|
-
query_params = {}
|
28
|
-
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
29
|
-
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
30
|
-
post_body = nil
|
31
|
-
|
32
|
-
local_var_path = '/external-auths/{system_id}'.sub('{' + 'system_id' + '}', system_id.to_s)
|
33
|
-
data = @api_client.call_api(:GET, local_var_path,
|
34
|
-
:query_params => query_params,
|
35
|
-
:body => post_body)
|
36
|
-
return data
|
37
|
-
end
|
38
|
-
|
39
|
-
# List external authentications
|
40
|
-
def get_collection(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
|
-
|
43
|
-
query_params = {}
|
44
|
-
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
45
|
-
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
46
|
-
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
47
|
-
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
48
|
-
post_body = nil
|
49
|
-
|
50
|
-
local_var_path = '/external-auths'
|
51
|
-
data = @api_client.call_api(:GET, local_var_path,
|
52
|
-
:query_params => query_params,
|
53
|
-
:body => post_body)
|
54
|
-
return data
|
55
|
-
end
|
56
|
-
|
57
|
-
# Add external authentication
|
58
|
-
def create(body, opts = {})
|
59
|
-
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
60
|
-
|
61
|
-
query_params = {}
|
62
|
-
post_body = @api_client.object_to_http_body(body)
|
63
|
-
|
64
|
-
local_var_path = '/external-auths'
|
65
|
-
data = @api_client.call_api(:POST, local_var_path,
|
66
|
-
:query_params => query_params,
|
67
|
-
:body => post_body)
|
68
|
-
return data
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|