     1: <?php
     2:
     3: class Mailchimp_Gallery {
     4:     public function __construct(Mailchimp $master) {
     5:         $this->master = $master;
     6:     }
     7:
     8:     /**
     9:      * Return a section of the image gallery
    10:      * @param associative_array $opts
    11:      *     - type string optional the gallery type to return - images or files - default to images
    12:      *     - start int optional for large data sets, the page number to start at - defaults to 1st page of data  (page 0)
    13:      *     - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100
    14:      *     - sort_by string optional field to sort by - one of size, time, name - defaults to time
    15:      *     - sort_dir string optional field to sort by - one of asc, desc - defaults to desc
    16:      *     - search_term string optional a term to search for in names
    17:      * @return associative_array the matching gallery items
    18:      *     - total int the total matching items
    19:      *     - data array structs for each item included in the set, including:
    20:      *         - name string the file name
    21:      *         - time string the creation date for the item
    22:      *         - size int the file size in bytes
    23:      *         - full string the url to the actual item in the gallery
    24:      *         - thumb string a url for a thumbnail that can be used to represent the item, generally an image thumbnail or an icon for a file type
    25:      */
    26:     public function getList($opts=array()) {
    27:         $_params = array("opts" => $opts);
    28:         return $this->master->call('gallery/list', $_params);
    29:     }
    30:
    31: }
    32:
    33:
    34: