Esempio n. 1
0
 function getConstantContactLists()
 {
     global $premise_base;
     require_once PREMISE_LIB_DIR . 'constant_contact_api/constant_contact_api.php';
     $settings = $premise_base->get_settings();
     $optin = $settings['optin'];
     $premise_base->setup_constant_contact($this->_optin_ConstantContactKey, $optin['constant-contact-username'], $optin['constant-contact-password']);
     $lists = new ListsCollection();
     list($items) = $lists->getLists();
     $return = array();
     foreach ($items as $item) {
         $return[] = array('id' => preg_replace('/[^0-9]/', '', (string) $item->getId()), 'name' => (string) $item->getName());
     }
     return array_slice($return, 3);
 }
Esempio n. 2
0
    /**
     * Get a page of Lists
     * @param string $page - optional 'nextLink' returned from a previous getLists() call
	 * @param bool $systemLists - set to true to return the 'Active', 'Removed' and 'Do Not Mail' system lists
     * @return array - Up to 50 Lists and a link to the next page if one exists
     */
    public function getLists($page=null, $systemLists=false){
        $ListsCollection = new ListsCollection($this->CTCTRequest);
        return $ListsCollection->getLists($page, $systemLists);
    }