Class: Mailchimp::Gallery
- Inherits:
-
Object
- Object
- Mailchimp::Gallery
- Defined in:
- lib/mailchimp/api.rb
Instance Attribute Summary collapse
-
#master ⇒ Object
Returns the value of attribute master.
Instance Method Summary collapse
-
#add_file_to_folder(file_id, folder_id) ⇒ Boolean
Add a file to a folder.
-
#add_folder(name) ⇒ Hash
Adds a folder to the file gallery.
-
#initialize(master) ⇒ Gallery
constructor
A new instance of Gallery.
-
#list(opts = []) ⇒ Hash
Return a section of the image gallery.
-
#list_folders(opts = []) ⇒ Hash
Return a list of the folders available to the file gallery.
-
#remove_all_files_from_folder(folder_id) ⇒ Boolean
Remove all files from a folder (Note that the files are not deleted, they are only removed from the folder).
-
#remove_file_from_folder(file_id, folder_id) ⇒ Boolean
Remove a file from a folder.
-
#remove_folder(folder_id) ⇒ Boolean
Remove a folder.
Constructor Details
#initialize(master) ⇒ Gallery
Returns a new instance of Gallery.
2283 2284 2285 |
# File 'lib/mailchimp/api.rb', line 2283 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
2281 2282 2283 |
# File 'lib/mailchimp/api.rb', line 2281 def master @master end |
Instance Method Details
#add_file_to_folder(file_id, folder_id) ⇒ Boolean
Add a file to a folder
2347 2348 2349 2350 |
# File 'lib/mailchimp/api.rb', line 2347 def add_file_to_folder(file_id, folder_id) _params = {:file_id => file_id, :folder_id => folder_id} return @master.call 'gallery/add-file-to-folder', _params end |
#add_folder(name) ⇒ Hash
Adds a folder to the file gallery
2330 2331 2332 2333 |
# File 'lib/mailchimp/api.rb', line 2330 def add_folder(name) _params = {:name => name} return @master.call 'gallery/add-folder', _params end |
#list(opts = []) ⇒ Hash
Return a section of the image gallery
2305 2306 2307 2308 |
# File 'lib/mailchimp/api.rb', line 2305 def list(opts=[]) _params = {:opts => opts} return @master.call 'gallery/list', _params end |
#list_folders(opts = []) ⇒ Hash
Return a list of the folders available to the file gallery
2321 2322 2323 2324 |
# File 'lib/mailchimp/api.rb', line 2321 def list_folders(opts=[]) _params = {:opts => opts} return @master.call 'gallery/list-folders', _params end |
#remove_all_files_from_folder(folder_id) ⇒ Boolean
Remove all files from a folder (Note that the files are not deleted, they are only removed from the folder)
2364 2365 2366 2367 |
# File 'lib/mailchimp/api.rb', line 2364 def remove_all_files_from_folder(folder_id) _params = {:folder_id => folder_id} return @master.call 'gallery/remove-all-files-from-folder', _params end |
#remove_file_from_folder(file_id, folder_id) ⇒ Boolean
Remove a file from a folder
2356 2357 2358 2359 |
# File 'lib/mailchimp/api.rb', line 2356 def remove_file_from_folder(file_id, folder_id) _params = {:file_id => file_id, :folder_id => folder_id} return @master.call 'gallery/remove-file-from-folder', _params end |
#remove_folder(folder_id) ⇒ Boolean
Remove a folder
2338 2339 2340 2341 |
# File 'lib/mailchimp/api.rb', line 2338 def remove_folder(folder_id) _params = {:folder_id => folder_id} return @master.call 'gallery/remove-folder', _params end |