MailchimpMarketing 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/MailchimpMarketing.gemspec +45 -0
- data/README.md +369 -0
- data/lib/MailchimpMarketing.rb +163 -0
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +113 -0
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +171 -0
- data/lib/MailchimpMarketing/api/automations_api.rb +906 -0
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +260 -0
- data/lib/MailchimpMarketing/api/batches_api.rb +214 -0
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +260 -0
- data/lib/MailchimpMarketing/api/campaigns_api.rb +1073 -0
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +257 -0
- data/lib/MailchimpMarketing/api/conversations_api.rb +293 -0
- data/lib/MailchimpMarketing/api/dashboard_api.rb +317 -0
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +3004 -0
- data/lib/MailchimpMarketing/api/external_auths_api.rb +171 -0
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +133 -0
- data/lib/MailchimpMarketing/api/file_manager_api.rb +566 -0
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +399 -0
- data/lib/MailchimpMarketing/api/lists_api.rb +3457 -0
- data/lib/MailchimpMarketing/api/ping_api.rb +65 -0
- data/lib/MailchimpMarketing/api/postcards_api.rb +77 -0
- data/lib/MailchimpMarketing/api/reporting_api.rb +338 -0
- data/lib/MailchimpMarketing/api/reports_api.rb +1214 -0
- data/lib/MailchimpMarketing/api/root_api.rb +71 -0
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +74 -0
- data/lib/MailchimpMarketing/api/search_members_api.rb +77 -0
- data/lib/MailchimpMarketing/api/template_folders_api.rb +260 -0
- data/lib/MailchimpMarketing/api/templates_api.rb +331 -0
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +242 -0
- data/lib/MailchimpMarketing/api_client.rb +192 -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,171 @@
|
|
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.1
|
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
|
+
# Get an External Authentication
|
23
|
+
# Get information about a specific partners External Authentication for a user.
|
24
|
+
# @param system_id The System name for external partner.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
27
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
28
|
+
# @return [ExternalAuthenticationsExternalAuths]
|
29
|
+
def get(system_id = {}, opts = {})
|
30
|
+
data, _status_code, _headers = get_with_http_info(system_id, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Get an External Authentication
|
35
|
+
# Get information about a specific partners External Authentication for a user.
|
36
|
+
# @param system_id The System name for external partner.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
39
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
40
|
+
# @return [Array<(ExternalAuthenticationsExternalAuths, Fixnum, Hash)>] ExternalAuthenticationsExternalAuths data, response status code and response headers
|
41
|
+
def get_with_http_info(system_id, opts = {})
|
42
|
+
# resource path
|
43
|
+
local_var_path = '/external-auths/{system_id}'.sub('{' + 'system_id' + '}', system_id.to_s)
|
44
|
+
|
45
|
+
# query parameters
|
46
|
+
query_params = {}
|
47
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
48
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
49
|
+
|
50
|
+
# header parameters
|
51
|
+
header_params = {}
|
52
|
+
# HTTP header 'Accept' (if needed)
|
53
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
54
|
+
# HTTP header 'Content-Type'
|
55
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
56
|
+
|
57
|
+
# form parameters
|
58
|
+
form_params = {}
|
59
|
+
|
60
|
+
# http body (model)
|
61
|
+
post_body = nil
|
62
|
+
auth_names = ['basicAuth']
|
63
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => 'ExternalAuthenticationsExternalAuths')
|
70
|
+
return data, status_code, headers
|
71
|
+
end
|
72
|
+
# Get a collection of External Authentications
|
73
|
+
# Get a collection of External Authentications
|
74
|
+
# @param [Hash] opts the optional parameters
|
75
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
76
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
77
|
+
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
78
|
+
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
79
|
+
# @return [ExternalAuthentications]
|
80
|
+
def get_collection(opts = {})
|
81
|
+
data, _status_code, _headers = get_collection_with_http_info(opts)
|
82
|
+
data
|
83
|
+
end
|
84
|
+
|
85
|
+
# Get a collection of External Authentications
|
86
|
+
# Get a collection of External Authentications
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
89
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
90
|
+
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
|
91
|
+
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
|
92
|
+
# @return [Array<(ExternalAuthentications, Fixnum, Hash)>] ExternalAuthentications data, response status code and response headers
|
93
|
+
def get_collection_with_http_info(opts = {})
|
94
|
+
# resource path
|
95
|
+
local_var_path = '/external-auths'
|
96
|
+
|
97
|
+
# query parameters
|
98
|
+
query_params = {}
|
99
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
100
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
101
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
102
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
103
|
+
|
104
|
+
# header parameters
|
105
|
+
header_params = {}
|
106
|
+
# HTTP header 'Accept' (if needed)
|
107
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
108
|
+
# HTTP header 'Content-Type'
|
109
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
110
|
+
|
111
|
+
# form parameters
|
112
|
+
form_params = {}
|
113
|
+
|
114
|
+
# http body (model)
|
115
|
+
post_body = nil
|
116
|
+
auth_names = ['basicAuth']
|
117
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
118
|
+
:header_params => header_params,
|
119
|
+
:query_params => query_params,
|
120
|
+
:form_params => form_params,
|
121
|
+
:body => post_body,
|
122
|
+
:auth_names => auth_names,
|
123
|
+
:return_type => 'ExternalAuthentications')
|
124
|
+
return data, status_code, headers
|
125
|
+
end
|
126
|
+
# Create a new External Auth
|
127
|
+
# Create a new external auth if one does not exist.
|
128
|
+
# @param body
|
129
|
+
# @param [Hash] opts the optional parameters
|
130
|
+
# @return [ExternalAuthenticationsExternalAuths]
|
131
|
+
def create(body = {}, opts = {})
|
132
|
+
data, _status_code, _headers = create_with_http_info(body, opts)
|
133
|
+
data
|
134
|
+
end
|
135
|
+
|
136
|
+
# Create a new External Auth
|
137
|
+
# Create a new external auth if one does not exist.
|
138
|
+
# @param body
|
139
|
+
# @param [Hash] opts the optional parameters
|
140
|
+
# @return [Array<(ExternalAuthenticationsExternalAuths, Fixnum, Hash)>] ExternalAuthenticationsExternalAuths data, response status code and response headers
|
141
|
+
def create_with_http_info(body, opts = {})
|
142
|
+
# resource path
|
143
|
+
local_var_path = '/external-auths'
|
144
|
+
|
145
|
+
# query parameters
|
146
|
+
query_params = {}
|
147
|
+
|
148
|
+
# header parameters
|
149
|
+
header_params = {}
|
150
|
+
# HTTP header 'Accept' (if needed)
|
151
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
152
|
+
# HTTP header 'Content-Type'
|
153
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
154
|
+
|
155
|
+
# form parameters
|
156
|
+
form_params = {}
|
157
|
+
|
158
|
+
# http body (model)
|
159
|
+
post_body = @api_client.object_to_http_body(body)
|
160
|
+
auth_names = ['basicAuth']
|
161
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
162
|
+
:header_params => header_params,
|
163
|
+
:query_params => query_params,
|
164
|
+
:form_params => form_params,
|
165
|
+
:body => post_body,
|
166
|
+
:auth_names => auth_names,
|
167
|
+
:return_type => 'ExternalAuthenticationsExternalAuths')
|
168
|
+
return data, status_code, headers
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
@@ -0,0 +1,133 @@
|
|
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.1
|
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 FacebookAdsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# __summary__
|
23
|
+
# Get list of Facebook Ads
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
26
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
27
|
+
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
28
|
+
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
29
|
+
# @option opts [String] :sort_field Returns files sorted by the specified field.
|
30
|
+
# @option opts [String] :sort_dir Determines the order direction for sorted results.
|
31
|
+
# @return [InlineResponse2009]
|
32
|
+
def list(opts = {})
|
33
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
34
|
+
data
|
35
|
+
end
|
36
|
+
|
37
|
+
# __summary__
|
38
|
+
# Get list of Facebook Ads
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
41
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
42
|
+
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
|
43
|
+
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
|
44
|
+
# @option opts [String] :sort_field Returns files sorted by the specified field.
|
45
|
+
# @option opts [String] :sort_dir Determines the order direction for sorted results.
|
46
|
+
# @return [Array<(InlineResponse2009, Fixnum, Hash)>] InlineResponse2009 data, response status code and response headers
|
47
|
+
def list_with_http_info(opts = {})
|
48
|
+
# resource path
|
49
|
+
local_var_path = '/facebook-ads'
|
50
|
+
|
51
|
+
# query parameters
|
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
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
56
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
57
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
58
|
+
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
59
|
+
|
60
|
+
# header parameters
|
61
|
+
header_params = {}
|
62
|
+
# HTTP header 'Accept' (if needed)
|
63
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
64
|
+
# HTTP header 'Content-Type'
|
65
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
66
|
+
|
67
|
+
# form parameters
|
68
|
+
form_params = {}
|
69
|
+
|
70
|
+
# http body (model)
|
71
|
+
post_body = nil
|
72
|
+
auth_names = ['basicAuth']
|
73
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => 'InlineResponse2009')
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
# __summary__
|
83
|
+
# Get details of a facebook ad
|
84
|
+
# @param outreach_id The outreach id.
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
87
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
88
|
+
# @return [InlineResponse20010]
|
89
|
+
def get_ad(outreach_id = {}, opts = {})
|
90
|
+
data, _status_code, _headers = get_ad_with_http_info(outreach_id, opts)
|
91
|
+
data
|
92
|
+
end
|
93
|
+
|
94
|
+
# __summary__
|
95
|
+
# Get details of a facebook ad
|
96
|
+
# @param outreach_id The outreach id.
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
99
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
100
|
+
# @return [Array<(InlineResponse20010, Fixnum, Hash)>] InlineResponse20010 data, response status code and response headers
|
101
|
+
def get_ad_with_http_info(outreach_id, opts = {})
|
102
|
+
# resource path
|
103
|
+
local_var_path = '/facebook-ads/{outreach_id}'.sub('{' + 'outreach_id' + '}', outreach_id.to_s)
|
104
|
+
|
105
|
+
# query parameters
|
106
|
+
query_params = {}
|
107
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
108
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
109
|
+
|
110
|
+
# header parameters
|
111
|
+
header_params = {}
|
112
|
+
# HTTP header 'Accept' (if needed)
|
113
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
114
|
+
# HTTP header 'Content-Type'
|
115
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
116
|
+
|
117
|
+
# form parameters
|
118
|
+
form_params = {}
|
119
|
+
|
120
|
+
# http body (model)
|
121
|
+
post_body = nil
|
122
|
+
auth_names = ['basicAuth']
|
123
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
124
|
+
:header_params => header_params,
|
125
|
+
:query_params => query_params,
|
126
|
+
:form_params => form_params,
|
127
|
+
:body => post_body,
|
128
|
+
:auth_names => auth_names,
|
129
|
+
:return_type => 'InlineResponse20010')
|
130
|
+
return data, status_code, headers
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
@@ -0,0 +1,566 @@
|
|
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.1
|
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 FileManagerApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Remove a specific file
|
23
|
+
# Remove a specific file from the File Manager.
|
24
|
+
# @param file_id The unique id for the File Manager file.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [nil]
|
27
|
+
def delete_file(file_id = {}, opts = {})
|
28
|
+
delete_file_with_http_info(file_id, opts)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
# Remove a specific file
|
33
|
+
# Remove a specific file from the File Manager.
|
34
|
+
# @param file_id The unique id for the File Manager file.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
37
|
+
def delete_file_with_http_info(file_id, opts = {})
|
38
|
+
# resource path
|
39
|
+
local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
|
40
|
+
|
41
|
+
# query parameters
|
42
|
+
query_params = {}
|
43
|
+
|
44
|
+
# header parameters
|
45
|
+
header_params = {}
|
46
|
+
# HTTP header 'Accept' (if needed)
|
47
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
48
|
+
# HTTP header 'Content-Type'
|
49
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
50
|
+
|
51
|
+
# form parameters
|
52
|
+
form_params = {}
|
53
|
+
|
54
|
+
# http body (model)
|
55
|
+
post_body = nil
|
56
|
+
auth_names = ['basicAuth']
|
57
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
58
|
+
:header_params => header_params,
|
59
|
+
:query_params => query_params,
|
60
|
+
:form_params => form_params,
|
61
|
+
:body => post_body,
|
62
|
+
:auth_names => auth_names)
|
63
|
+
return data, status_code, headers
|
64
|
+
end
|
65
|
+
# Remove a File Manager folder
|
66
|
+
# Delete a specific folder in the File Manager.
|
67
|
+
# @param folder_id The unique id for the File Manager folder.
|
68
|
+
# @param [Hash] opts the optional parameters
|
69
|
+
# @return [nil]
|
70
|
+
def delete_folder(folder_id = {}, opts = {})
|
71
|
+
delete_folder_with_http_info(folder_id, opts)
|
72
|
+
nil
|
73
|
+
end
|
74
|
+
|
75
|
+
# Remove a File Manager folder
|
76
|
+
# Delete a specific folder in the File Manager.
|
77
|
+
# @param folder_id The unique id for the File Manager folder.
|
78
|
+
# @param [Hash] opts the optional parameters
|
79
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
80
|
+
def delete_folder_with_http_info(folder_id, opts = {})
|
81
|
+
# resource path
|
82
|
+
local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
|
83
|
+
|
84
|
+
# query parameters
|
85
|
+
query_params = {}
|
86
|
+
|
87
|
+
# header parameters
|
88
|
+
header_params = {}
|
89
|
+
# HTTP header 'Accept' (if needed)
|
90
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
91
|
+
# HTTP header 'Content-Type'
|
92
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
93
|
+
|
94
|
+
# form parameters
|
95
|
+
form_params = {}
|
96
|
+
|
97
|
+
# http body (model)
|
98
|
+
post_body = nil
|
99
|
+
auth_names = ['basicAuth']
|
100
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
101
|
+
:header_params => header_params,
|
102
|
+
:query_params => query_params,
|
103
|
+
:form_params => form_params,
|
104
|
+
:body => post_body,
|
105
|
+
:auth_names => auth_names)
|
106
|
+
return data, status_code, headers
|
107
|
+
end
|
108
|
+
# Get information about the file-manager endpoint's resources
|
109
|
+
# Get information about the file-manager endpoint's resources
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @return [FileManager]
|
112
|
+
def get(opts = {})
|
113
|
+
data, _status_code, _headers = get_with_http_info(opts)
|
114
|
+
data
|
115
|
+
end
|
116
|
+
|
117
|
+
# Get information about the file-manager endpoint's resources
|
118
|
+
# Get information about the file-manager endpoint's resources
|
119
|
+
# @param [Hash] opts the optional parameters
|
120
|
+
# @return [Array<(FileManager, Fixnum, Hash)>] FileManager data, response status code and response headers
|
121
|
+
def get_with_http_info(opts = {})
|
122
|
+
# resource path
|
123
|
+
local_var_path = '/file-manager'
|
124
|
+
|
125
|
+
# query parameters
|
126
|
+
query_params = {}
|
127
|
+
|
128
|
+
# header parameters
|
129
|
+
header_params = {}
|
130
|
+
# HTTP header 'Accept' (if needed)
|
131
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
132
|
+
# HTTP header 'Content-Type'
|
133
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
134
|
+
|
135
|
+
# form parameters
|
136
|
+
form_params = {}
|
137
|
+
|
138
|
+
# http body (model)
|
139
|
+
post_body = nil
|
140
|
+
auth_names = ['basicAuth']
|
141
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
142
|
+
:header_params => header_params,
|
143
|
+
:query_params => query_params,
|
144
|
+
:form_params => form_params,
|
145
|
+
:body => post_body,
|
146
|
+
:auth_names => auth_names,
|
147
|
+
:return_type => 'FileManager')
|
148
|
+
return data, status_code, headers
|
149
|
+
end
|
150
|
+
# Get information about stored files
|
151
|
+
# Get a list of available images and files stored in the File Manager for the account.
|
152
|
+
# @param [Hash] opts the optional parameters
|
153
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
154
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
155
|
+
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
156
|
+
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
157
|
+
# @option opts [String] :type The file type for the File Manager file.
|
158
|
+
# @option opts [String] :created_by The Mailchimp account user who created the File Manager file.
|
159
|
+
# @option opts [String] :before_created_at Restrict the response to files created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
160
|
+
# @option opts [String] :since_created_at Restrict the response to files created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
161
|
+
# @option opts [String] :sort_field Returns files sorted by the specified field.
|
162
|
+
# @option opts [String] :sort_dir Determines the order direction for sorted results.
|
163
|
+
# @return [FileManager1]
|
164
|
+
def files(opts = {})
|
165
|
+
data, _status_code, _headers = files_with_http_info(opts)
|
166
|
+
data
|
167
|
+
end
|
168
|
+
|
169
|
+
# Get information about stored files
|
170
|
+
# Get a list of available images and files stored in the File Manager for the account.
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
173
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
174
|
+
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
|
175
|
+
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
|
176
|
+
# @option opts [String] :type The file type for the File Manager file.
|
177
|
+
# @option opts [String] :created_by The Mailchimp account user who created the File Manager file.
|
178
|
+
# @option opts [String] :before_created_at Restrict the response to files created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
179
|
+
# @option opts [String] :since_created_at Restrict the response to files created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
180
|
+
# @option opts [String] :sort_field Returns files sorted by the specified field.
|
181
|
+
# @option opts [String] :sort_dir Determines the order direction for sorted results.
|
182
|
+
# @return [Array<(FileManager1, Fixnum, Hash)>] FileManager1 data, response status code and response headers
|
183
|
+
def files_with_http_info(opts = {})
|
184
|
+
# resource path
|
185
|
+
local_var_path = '/file-manager/files'
|
186
|
+
|
187
|
+
# query parameters
|
188
|
+
query_params = {}
|
189
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
190
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
191
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
192
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
193
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
194
|
+
query_params[:'created_by'] = opts[:'created_by'] if !opts[:'created_by'].nil?
|
195
|
+
query_params[:'before_created_at'] = opts[:'before_created_at'] if !opts[:'before_created_at'].nil?
|
196
|
+
query_params[:'since_created_at'] = opts[:'since_created_at'] if !opts[:'since_created_at'].nil?
|
197
|
+
query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
|
198
|
+
query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil?
|
199
|
+
|
200
|
+
# header parameters
|
201
|
+
header_params = {}
|
202
|
+
# HTTP header 'Accept' (if needed)
|
203
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
204
|
+
# HTTP header 'Content-Type'
|
205
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
206
|
+
|
207
|
+
# form parameters
|
208
|
+
form_params = {}
|
209
|
+
|
210
|
+
# http body (model)
|
211
|
+
post_body = nil
|
212
|
+
auth_names = ['basicAuth']
|
213
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
214
|
+
:header_params => header_params,
|
215
|
+
:query_params => query_params,
|
216
|
+
:form_params => form_params,
|
217
|
+
:body => post_body,
|
218
|
+
:auth_names => auth_names,
|
219
|
+
:return_type => 'FileManager1')
|
220
|
+
return data, status_code, headers
|
221
|
+
end
|
222
|
+
# Get a specific file
|
223
|
+
# Get information about a specific file in the File Manager.
|
224
|
+
# @param file_id The unique id for the File Manager file.
|
225
|
+
# @param [Hash] opts the optional parameters
|
226
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
227
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
228
|
+
# @return [GalleryFile]
|
229
|
+
def get_file(file_id = {}, opts = {})
|
230
|
+
data, _status_code, _headers = get_file_with_http_info(file_id, opts)
|
231
|
+
data
|
232
|
+
end
|
233
|
+
|
234
|
+
# Get a specific file
|
235
|
+
# Get information about a specific file in the File Manager.
|
236
|
+
# @param file_id The unique id for the File Manager file.
|
237
|
+
# @param [Hash] opts the optional parameters
|
238
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
239
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
240
|
+
# @return [Array<(GalleryFile, Fixnum, Hash)>] GalleryFile data, response status code and response headers
|
241
|
+
def get_file_with_http_info(file_id, opts = {})
|
242
|
+
# resource path
|
243
|
+
local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
|
244
|
+
|
245
|
+
# query parameters
|
246
|
+
query_params = {}
|
247
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
248
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
249
|
+
|
250
|
+
# header parameters
|
251
|
+
header_params = {}
|
252
|
+
# HTTP header 'Accept' (if needed)
|
253
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
254
|
+
# HTTP header 'Content-Type'
|
255
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
256
|
+
|
257
|
+
# form parameters
|
258
|
+
form_params = {}
|
259
|
+
|
260
|
+
# http body (model)
|
261
|
+
post_body = nil
|
262
|
+
auth_names = ['basicAuth']
|
263
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
264
|
+
:header_params => header_params,
|
265
|
+
:query_params => query_params,
|
266
|
+
:form_params => form_params,
|
267
|
+
:body => post_body,
|
268
|
+
:auth_names => auth_names,
|
269
|
+
:return_type => 'GalleryFile')
|
270
|
+
return data, status_code, headers
|
271
|
+
end
|
272
|
+
# Get a list of folders in the File Manager
|
273
|
+
# Get a list of all folders in the File Manager.
|
274
|
+
# @param [Hash] opts the optional parameters
|
275
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
276
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
277
|
+
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
278
|
+
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
279
|
+
# @option opts [String] :created_by The Mailchimp account user who created the File Manager file.
|
280
|
+
# @option opts [String] :before_created_at Restrict the response to files created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
281
|
+
# @option opts [String] :since_created_at Restrict the response to files created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
282
|
+
# @return [FileManagerFolders]
|
283
|
+
def list_folders(opts = {})
|
284
|
+
data, _status_code, _headers = list_folders_with_http_info(opts)
|
285
|
+
data
|
286
|
+
end
|
287
|
+
|
288
|
+
# Get a list of folders in the File Manager
|
289
|
+
# Get a list of all folders in the File Manager.
|
290
|
+
# @param [Hash] opts the optional parameters
|
291
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
292
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
293
|
+
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
|
294
|
+
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
|
295
|
+
# @option opts [String] :created_by The Mailchimp account user who created the File Manager file.
|
296
|
+
# @option opts [String] :before_created_at Restrict the response to files created before the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
297
|
+
# @option opts [String] :since_created_at Restrict the response to files created after the set date. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
298
|
+
# @return [Array<(FileManagerFolders, Fixnum, Hash)>] FileManagerFolders data, response status code and response headers
|
299
|
+
def list_folders_with_http_info(opts = {})
|
300
|
+
# resource path
|
301
|
+
local_var_path = '/file-manager/folders'
|
302
|
+
|
303
|
+
# query parameters
|
304
|
+
query_params = {}
|
305
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
306
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
307
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
308
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
309
|
+
query_params[:'created_by'] = opts[:'created_by'] if !opts[:'created_by'].nil?
|
310
|
+
query_params[:'before_created_at'] = opts[:'before_created_at'] if !opts[:'before_created_at'].nil?
|
311
|
+
query_params[:'since_created_at'] = opts[:'since_created_at'] if !opts[:'since_created_at'].nil?
|
312
|
+
|
313
|
+
# header parameters
|
314
|
+
header_params = {}
|
315
|
+
# HTTP header 'Accept' (if needed)
|
316
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
317
|
+
# HTTP header 'Content-Type'
|
318
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
319
|
+
|
320
|
+
# form parameters
|
321
|
+
form_params = {}
|
322
|
+
|
323
|
+
# http body (model)
|
324
|
+
post_body = nil
|
325
|
+
auth_names = ['basicAuth']
|
326
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
327
|
+
:header_params => header_params,
|
328
|
+
:query_params => query_params,
|
329
|
+
:form_params => form_params,
|
330
|
+
:body => post_body,
|
331
|
+
:auth_names => auth_names,
|
332
|
+
:return_type => 'FileManagerFolders')
|
333
|
+
return data, status_code, headers
|
334
|
+
end
|
335
|
+
# Get information about a specific folder
|
336
|
+
# Get information about a specific folder in the File Manager.
|
337
|
+
# @param folder_id The unique id for the File Manager folder.
|
338
|
+
# @param [Hash] opts the optional parameters
|
339
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
340
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
341
|
+
# @return [GalleryFolder]
|
342
|
+
def get_folder(folder_id = {}, opts = {})
|
343
|
+
data, _status_code, _headers = get_folder_with_http_info(folder_id, opts)
|
344
|
+
data
|
345
|
+
end
|
346
|
+
|
347
|
+
# Get information about a specific folder
|
348
|
+
# Get information about a specific folder in the File Manager.
|
349
|
+
# @param folder_id The unique id for the File Manager folder.
|
350
|
+
# @param [Hash] opts the optional parameters
|
351
|
+
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
352
|
+
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
353
|
+
# @return [Array<(GalleryFolder, Fixnum, Hash)>] GalleryFolder data, response status code and response headers
|
354
|
+
def get_folder_with_http_info(folder_id, opts = {})
|
355
|
+
# resource path
|
356
|
+
local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
|
357
|
+
|
358
|
+
# query parameters
|
359
|
+
query_params = {}
|
360
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
361
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
362
|
+
|
363
|
+
# header parameters
|
364
|
+
header_params = {}
|
365
|
+
# HTTP header 'Accept' (if needed)
|
366
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
367
|
+
# HTTP header 'Content-Type'
|
368
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
369
|
+
|
370
|
+
# form parameters
|
371
|
+
form_params = {}
|
372
|
+
|
373
|
+
# http body (model)
|
374
|
+
post_body = nil
|
375
|
+
auth_names = ['basicAuth']
|
376
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
377
|
+
:header_params => header_params,
|
378
|
+
:query_params => query_params,
|
379
|
+
:form_params => form_params,
|
380
|
+
:body => post_body,
|
381
|
+
:auth_names => auth_names,
|
382
|
+
:return_type => 'GalleryFolder')
|
383
|
+
return data, status_code, headers
|
384
|
+
end
|
385
|
+
# Update a specific file
|
386
|
+
# Update a file in the File Manager.
|
387
|
+
# @param file_id The unique id for the File Manager file.
|
388
|
+
# @param body
|
389
|
+
# @param [Hash] opts the optional parameters
|
390
|
+
# @return [GalleryFile]
|
391
|
+
def update_file(file_id = {}, body = {}, opts = {})
|
392
|
+
data, _status_code, _headers = update_file_with_http_info(file_id, body, opts)
|
393
|
+
data
|
394
|
+
end
|
395
|
+
|
396
|
+
# Update a specific file
|
397
|
+
# Update a file in the File Manager.
|
398
|
+
# @param file_id The unique id for the File Manager file.
|
399
|
+
# @param body
|
400
|
+
# @param [Hash] opts the optional parameters
|
401
|
+
# @return [Array<(GalleryFile, Fixnum, Hash)>] GalleryFile data, response status code and response headers
|
402
|
+
def update_file_with_http_info(file_id, body, opts = {})
|
403
|
+
# resource path
|
404
|
+
local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)
|
405
|
+
|
406
|
+
# query parameters
|
407
|
+
query_params = {}
|
408
|
+
|
409
|
+
# header parameters
|
410
|
+
header_params = {}
|
411
|
+
# HTTP header 'Accept' (if needed)
|
412
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
413
|
+
# HTTP header 'Content-Type'
|
414
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
415
|
+
|
416
|
+
# form parameters
|
417
|
+
form_params = {}
|
418
|
+
|
419
|
+
# http body (model)
|
420
|
+
post_body = @api_client.object_to_http_body(body)
|
421
|
+
auth_names = ['basicAuth']
|
422
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
423
|
+
:header_params => header_params,
|
424
|
+
:query_params => query_params,
|
425
|
+
:form_params => form_params,
|
426
|
+
:body => post_body,
|
427
|
+
:auth_names => auth_names,
|
428
|
+
:return_type => 'GalleryFile')
|
429
|
+
return data, status_code, headers
|
430
|
+
end
|
431
|
+
# Update a File Manager folder
|
432
|
+
# Update a specific File Manager folder.
|
433
|
+
# @param folder_id The unique id for the File Manager folder.
|
434
|
+
# @param body
|
435
|
+
# @param [Hash] opts the optional parameters
|
436
|
+
# @return [GalleryFolder]
|
437
|
+
def update_folder(folder_id = {}, body = {}, opts = {})
|
438
|
+
data, _status_code, _headers = update_folder_with_http_info(folder_id, body, opts)
|
439
|
+
data
|
440
|
+
end
|
441
|
+
|
442
|
+
# Update a File Manager folder
|
443
|
+
# Update a specific File Manager folder.
|
444
|
+
# @param folder_id The unique id for the File Manager folder.
|
445
|
+
# @param body
|
446
|
+
# @param [Hash] opts the optional parameters
|
447
|
+
# @return [Array<(GalleryFolder, Fixnum, Hash)>] GalleryFolder data, response status code and response headers
|
448
|
+
def update_folder_with_http_info(folder_id, body, opts = {})
|
449
|
+
# resource path
|
450
|
+
local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)
|
451
|
+
|
452
|
+
# query parameters
|
453
|
+
query_params = {}
|
454
|
+
|
455
|
+
# header parameters
|
456
|
+
header_params = {}
|
457
|
+
# HTTP header 'Accept' (if needed)
|
458
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
459
|
+
# HTTP header 'Content-Type'
|
460
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
461
|
+
|
462
|
+
# form parameters
|
463
|
+
form_params = {}
|
464
|
+
|
465
|
+
# http body (model)
|
466
|
+
post_body = @api_client.object_to_http_body(body)
|
467
|
+
auth_names = ['basicAuth']
|
468
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
469
|
+
:header_params => header_params,
|
470
|
+
:query_params => query_params,
|
471
|
+
:form_params => form_params,
|
472
|
+
:body => post_body,
|
473
|
+
:auth_names => auth_names,
|
474
|
+
:return_type => 'GalleryFolder')
|
475
|
+
return data, status_code, headers
|
476
|
+
end
|
477
|
+
# Upload a new file
|
478
|
+
# Upload a new image or file to the File Manager.
|
479
|
+
# @param body
|
480
|
+
# @param [Hash] opts the optional parameters
|
481
|
+
# @return [GalleryFile]
|
482
|
+
def upload(body = {}, opts = {})
|
483
|
+
data, _status_code, _headers = upload_with_http_info(body, opts)
|
484
|
+
data
|
485
|
+
end
|
486
|
+
|
487
|
+
# Upload a new file
|
488
|
+
# Upload a new image or file to the File Manager.
|
489
|
+
# @param body
|
490
|
+
# @param [Hash] opts the optional parameters
|
491
|
+
# @return [Array<(GalleryFile, Fixnum, Hash)>] GalleryFile data, response status code and response headers
|
492
|
+
def upload_with_http_info(body, opts = {})
|
493
|
+
# resource path
|
494
|
+
local_var_path = '/file-manager/files'
|
495
|
+
|
496
|
+
# query parameters
|
497
|
+
query_params = {}
|
498
|
+
|
499
|
+
# header parameters
|
500
|
+
header_params = {}
|
501
|
+
# HTTP header 'Accept' (if needed)
|
502
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
503
|
+
# HTTP header 'Content-Type'
|
504
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
505
|
+
|
506
|
+
# form parameters
|
507
|
+
form_params = {}
|
508
|
+
|
509
|
+
# http body (model)
|
510
|
+
post_body = @api_client.object_to_http_body(body)
|
511
|
+
auth_names = ['basicAuth']
|
512
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
513
|
+
:header_params => header_params,
|
514
|
+
:query_params => query_params,
|
515
|
+
:form_params => form_params,
|
516
|
+
:body => post_body,
|
517
|
+
:auth_names => auth_names,
|
518
|
+
:return_type => 'GalleryFile')
|
519
|
+
return data, status_code, headers
|
520
|
+
end
|
521
|
+
# Create a new folder
|
522
|
+
# Create a new folder in the File Manager.
|
523
|
+
# @param body
|
524
|
+
# @param [Hash] opts the optional parameters
|
525
|
+
# @return [GalleryFolder]
|
526
|
+
def create_folder(body = {}, opts = {})
|
527
|
+
data, _status_code, _headers = create_folder_with_http_info(body, opts)
|
528
|
+
data
|
529
|
+
end
|
530
|
+
|
531
|
+
# Create a new folder
|
532
|
+
# Create a new folder in the File Manager.
|
533
|
+
# @param body
|
534
|
+
# @param [Hash] opts the optional parameters
|
535
|
+
# @return [Array<(GalleryFolder, Fixnum, Hash)>] GalleryFolder data, response status code and response headers
|
536
|
+
def create_folder_with_http_info(body, opts = {})
|
537
|
+
# resource path
|
538
|
+
local_var_path = '/file-manager/folders'
|
539
|
+
|
540
|
+
# query parameters
|
541
|
+
query_params = {}
|
542
|
+
|
543
|
+
# header parameters
|
544
|
+
header_params = {}
|
545
|
+
# HTTP header 'Accept' (if needed)
|
546
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
547
|
+
# HTTP header 'Content-Type'
|
548
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
549
|
+
|
550
|
+
# form parameters
|
551
|
+
form_params = {}
|
552
|
+
|
553
|
+
# http body (model)
|
554
|
+
post_body = @api_client.object_to_http_body(body)
|
555
|
+
auth_names = ['basicAuth']
|
556
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
557
|
+
:header_params => header_params,
|
558
|
+
:query_params => query_params,
|
559
|
+
:form_params => form_params,
|
560
|
+
:body => post_body,
|
561
|
+
:auth_names => auth_names,
|
562
|
+
:return_type => 'GalleryFolder')
|
563
|
+
return data, status_code, headers
|
564
|
+
end
|
565
|
+
end
|
566
|
+
end
|