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.
2277 2278 2279 |
# File 'lib/mailchimp/api.rb', line 2277 def initialize(master) @master = master end |
Instance Attribute Details
#master ⇒ Object
Returns the value of attribute master.
2275 2276 2277 |
# File 'lib/mailchimp/api.rb', line 2275 def master @master end |
Instance Method Details
#add_file_to_folder(file_id, folder_id) ⇒ Boolean
Add a file to a folder
2341 2342 2343 2344 |
# File 'lib/mailchimp/api.rb', line 2341 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
2324 2325 2326 2327 |
# File 'lib/mailchimp/api.rb', line 2324 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
2299 2300 2301 2302 |
# File 'lib/mailchimp/api.rb', line 2299 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
2315 2316 2317 2318 |
# File 'lib/mailchimp/api.rb', line 2315 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)
2358 2359 2360 2361 |
# File 'lib/mailchimp/api.rb', line 2358 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
2350 2351 2352 2353 |
# File 'lib/mailchimp/api.rb', line 2350 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
2332 2333 2334 2335 |
# File 'lib/mailchimp/api.rb', line 2332 def remove_folder(folder_id) _params = {:folder_id => folder_id} return @master.call 'gallery/remove-folder', _params end |