Class: MailchimpMarketing::FileManagerApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client) ⇒ FileManagerApi

Returns a new instance of FileManagerApi.



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

def initialize(api_client)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



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

def api_client
  @api_client
end

Instance Method Details

#create_folder(body = {}, opts = {}) ⇒ GalleryFolder

Create a new folder Create a new folder in the File Manager.

Parameters:

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

    the optional parameters

Returns:

  • (GalleryFolder)


526
527
528
529
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 526

def create_folder(body = {}, opts = {})
  data, _status_code, _headers = create_folder_with_http_info(body, opts)
  data
end

#create_folder_with_http_info(body, opts = {}) ⇒ Array<(GalleryFolder, Fixnum, Hash)>

Create a new folder Create a new folder in the File Manager.

Parameters:

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

    the optional parameters

Returns:

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

    GalleryFolder data, response status code and response headers



536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 536

def create_folder_with_http_info(body, opts = {})
  # resource path
  local_var_path = '/file-manager/folders'

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GalleryFolder')
  return data, status_code, headers
end

#delete_file(file_id = {}, opts = {}) ⇒ nil

Remove a specific file Remove a specific file from the File Manager.

Parameters:

  • file_id (defaults to: {})

    The unique id for the File Manager file.

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

    the optional parameters

Returns:

  • (nil)


27
28
29
30
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 27

def delete_file(file_id = {}, opts = {})
  delete_file_with_http_info(file_id, opts)
  nil
end

#delete_file_with_http_info(file_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Remove a specific file Remove a specific file from the File Manager.

Parameters:

  • file_id

    The unique id for the File Manager file.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

def delete_file_with_http_info(file_id, opts = {})
  # resource path
  local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  return data, status_code, headers
end

#delete_folder(folder_id = {}, opts = {}) ⇒ nil

Remove a File Manager folder Delete a specific folder in the File Manager.

Parameters:

  • folder_id (defaults to: {})

    The unique id for the File Manager folder.

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

    the optional parameters

Returns:

  • (nil)


70
71
72
73
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 70

def delete_folder(folder_id = {}, opts = {})
  delete_folder_with_http_info(folder_id, opts)
  nil
end

#delete_folder_with_http_info(folder_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Remove a File Manager folder Delete a specific folder in the File Manager.

Parameters:

  • folder_id

    The unique id for the File Manager folder.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 80

def delete_folder_with_http_info(folder_id, opts = {})
  # resource path
  local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  return data, status_code, headers
end

#files(opts = {}) ⇒ FileManager1

Get information about stored files Get a list of available images and files stored in the File Manager for the account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

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

  • :exclude_fields (Array<String>)

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

  • :count (Integer)

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

  • :offset (Integer)

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

  • :type (String)

    The file type for the File Manager file.

  • :created_by (String)

    The Mailchimp account user who created the File Manager file.

  • :before_created_at (String)

    Restrict the response to files created before the set date. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :since_created_at (String)

    Restrict the response to files created after the set date. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :sort_field (String)

    Returns files sorted by the specified field.

  • :sort_dir (String)

    Determines the order direction for sorted results.

Returns:

  • (FileManager1)


164
165
166
167
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 164

def files(opts = {})
  data, _status_code, _headers = files_with_http_info(opts)
  data
end

#files_with_http_info(opts = {}) ⇒ Array<(FileManager1, Fixnum, Hash)>

Get information about stored files Get a list of available images and files stored in the File Manager for the account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

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

  • :exclude_fields (Array<String>)

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

  • :count (Integer)

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

  • :offset (Integer)

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

  • :type (String)

    The file type for the File Manager file.

  • :created_by (String)

    The Mailchimp account user who created the File Manager file.

  • :before_created_at (String)

    Restrict the response to files created before the set date. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :since_created_at (String)

    Restrict the response to files created after the set date. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :sort_field (String)

    Returns files sorted by the specified field.

  • :sort_dir (String)

    Determines the order direction for sorted results.

Returns:

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

    FileManager1 data, response status code and response headers



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 183

def files_with_http_info(opts = {})
  # resource path
  local_var_path = '/file-manager/files'

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FileManager1')
  return data, status_code, headers
end

#get(opts = {}) ⇒ FileManager

Get information about the file-manager endpoint’s resources Get information about the file-manager endpoint’s resources

Parameters:

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

    the optional parameters

Returns:

  • (FileManager)


112
113
114
115
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 112

def get(opts = {})
  data, _status_code, _headers = get_with_http_info(opts)
  data
end

#get_file(file_id = {}, opts = {}) ⇒ GalleryFile

Get a specific file Get information about a specific file in the File Manager.

Parameters:

  • file_id (defaults to: {})

    The unique id for the File Manager file.

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

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

  • :exclude_fields (Array<String>)

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

Returns:

  • (GalleryFile)


229
230
231
232
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 229

def get_file(file_id = {}, opts = {})
  data, _status_code, _headers = get_file_with_http_info(file_id, opts)
  data
end

#get_file_with_http_info(file_id, opts = {}) ⇒ Array<(GalleryFile, Fixnum, Hash)>

Get a specific file Get information about a specific file in the File Manager.

Parameters:

  • file_id

    The unique id for the File Manager file.

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

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

  • :exclude_fields (Array<String>)

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

Returns:

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

    GalleryFile data, response status code and response headers



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 241

def get_file_with_http_info(file_id, opts = {})
  # resource path
  local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GalleryFile')
  return data, status_code, headers
end

#get_folder(folder_id = {}, opts = {}) ⇒ GalleryFolder

Get information about a specific folder Get information about a specific folder in the File Manager.

Parameters:

  • folder_id (defaults to: {})

    The unique id for the File Manager folder.

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

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

  • :exclude_fields (Array<String>)

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

Returns:

  • (GalleryFolder)


342
343
344
345
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 342

def get_folder(folder_id = {}, opts = {})
  data, _status_code, _headers = get_folder_with_http_info(folder_id, opts)
  data
end

#get_folder_with_http_info(folder_id, opts = {}) ⇒ Array<(GalleryFolder, Fixnum, Hash)>

Get information about a specific folder Get information about a specific folder in the File Manager.

Parameters:

  • folder_id

    The unique id for the File Manager folder.

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

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

  • :exclude_fields (Array<String>)

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

Returns:

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

    GalleryFolder data, response status code and response headers



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 354

def get_folder_with_http_info(folder_id, opts = {})
  # resource path
  local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GalleryFolder')
  return data, status_code, headers
end

#get_with_http_info(opts = {}) ⇒ Array<(FileManager, Fixnum, Hash)>

Get information about the file-manager endpoint&#39;s resources Get information about the file-manager endpoint&#39;s resources

Parameters:

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

    the optional parameters

Returns:

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

    FileManager data, response status code and response headers



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 121

def get_with_http_info(opts = {})
  # resource path
  local_var_path = '/file-manager'

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FileManager')
  return data, status_code, headers
end

#list_folders(opts = {}) ⇒ FileManagerFolders

Get a list of folders in the File Manager Get a list of all folders in the File Manager.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

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

  • :exclude_fields (Array<String>)

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

  • :count (Integer)

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

  • :offset (Integer)

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

  • :created_by (String)

    The Mailchimp account user who created the File Manager file.

  • :before_created_at (String)

    Restrict the response to files created before the set date. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :since_created_at (String)

    Restrict the response to files created after the set date. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

Returns:

  • (FileManagerFolders)


283
284
285
286
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 283

def list_folders(opts = {})
  data, _status_code, _headers = list_folders_with_http_info(opts)
  data
end

#list_folders_with_http_info(opts = {}) ⇒ Array<(FileManagerFolders, Fixnum, Hash)>

Get a list of folders in the File Manager Get a list of all folders in the File Manager.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

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

  • :exclude_fields (Array<String>)

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

  • :count (Integer)

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

  • :offset (Integer)

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

  • :created_by (String)

    The Mailchimp account user who created the File Manager file.

  • :before_created_at (String)

    Restrict the response to files created before the set date. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

  • :since_created_at (String)

    Restrict the response to files created after the set date. We recommend [ISO 8601](en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.

Returns:

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

    FileManagerFolders data, response status code and response headers



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 299

def list_folders_with_http_info(opts = {})
  # resource path
  local_var_path = '/file-manager/folders'

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

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'FileManagerFolders')
  return data, status_code, headers
end

#update_file(file_id = {}, body = {}, opts = {}) ⇒ GalleryFile

Update a specific file Update a file in the File Manager.

Parameters:

  • file_id (defaults to: {})

    The unique id for the File Manager file.

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

    the optional parameters

Returns:

  • (GalleryFile)


391
392
393
394
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 391

def update_file(file_id = {}, body = {}, opts = {})
  data, _status_code, _headers = update_file_with_http_info(file_id, body, opts)
  data
end

#update_file_with_http_info(file_id, body, opts = {}) ⇒ Array<(GalleryFile, Fixnum, Hash)>

Update a specific file Update a file in the File Manager.

Parameters:

  • file_id

    The unique id for the File Manager file.

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

    the optional parameters

Returns:

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

    GalleryFile data, response status code and response headers



402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 402

def update_file_with_http_info(file_id, body, opts = {})
  # resource path
  local_var_path = '/file-manager/files/{file_id}'.sub('{' + 'file_id' + '}', file_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GalleryFile')
  return data, status_code, headers
end

#update_folder(folder_id = {}, body = {}, opts = {}) ⇒ GalleryFolder

Update a File Manager folder Update a specific File Manager folder.

Parameters:

  • folder_id (defaults to: {})

    The unique id for the File Manager folder.

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

    the optional parameters

Returns:

  • (GalleryFolder)


437
438
439
440
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 437

def update_folder(folder_id = {}, body = {}, opts = {})
  data, _status_code, _headers = update_folder_with_http_info(folder_id, body, opts)
  data
end

#update_folder_with_http_info(folder_id, body, opts = {}) ⇒ Array<(GalleryFolder, Fixnum, Hash)>

Update a File Manager folder Update a specific File Manager folder.

Parameters:

  • folder_id

    The unique id for the File Manager folder.

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

    the optional parameters

Returns:

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

    GalleryFolder data, response status code and response headers



448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 448

def update_folder_with_http_info(folder_id, body, opts = {})
  # resource path
  local_var_path = '/file-manager/folders/{folder_id}'.sub('{' + 'folder_id' + '}', folder_id.to_s)

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GalleryFolder')
  return data, status_code, headers
end

#upload(body = {}, opts = {}) ⇒ GalleryFile

Upload a new file

Upload a new image or file to the File Manager.

Parameters:

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

    the optional parameters

Returns:

  • (GalleryFile)


482
483
484
485
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 482

def upload(body = {}, opts = {})
  data, _status_code, _headers = upload_with_http_info(body, opts)
  data
end

#upload_with_http_info(body, opts = {}) ⇒ Array<(GalleryFile, Fixnum, Hash)>

Upload a new file

Upload a new image or file to the File Manager.

Parameters:

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

    the optional parameters

Returns:

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

    GalleryFile data, response status code and response headers



492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/MailchimpMarketing/api/file_manager_api.rb', line 492

def upload_with_http_info(body, opts = {})
  # resource path
  local_var_path = '/file-manager/files'

  # query parameters
  query_params = {}

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

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GalleryFile')
  return data, status_code, headers
end