public static array listGet(string token, string filter, integer pageNumber, integer pageSize, string orderBy, string sortOrder)
Get the contact lists in your account.
Contact List Related Methods

string tokenA valid token for your account. To generate a token, use the login method.
string filterShow lists where the contact list name starts with the filter
integer pageNumberFetch results from the given page number.
integer pageSizeNumber of results per page.
string orderBySort the results based on "name" or "date".
string sortOrderSort the results in the "asc"ending or "desc"ending order.

arrayReturns an array with the results.

Return Structure
integer sequenceThe sequence number of the record
string idThe ID of the contact list. To get the contacts from this list , use the listGetContacts method.
string listnameName of the contact list
integer contactcountThe number of active contacts in the list
string createdDateThe date on which the list was created
string modifiedDateThe date on which the list was last updated

download example code

  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  10. $contactLists = $client->listGet($token, "", 1, 100, "", "");
  12. foreach($contactLists as $rec) {
  13.     echo $rec['sequence'] . "] List Name: " . $rec['listname'] . "(" . $rec['id'] . ")";
  14.     echo "\t Contacts:" . $rec['contactcount'] . "\t Created Date: " . $rec['createdDate'] ;
  15.     echo "\t Updated Date: " . $rec['modifiedDate'];
  16.     echo "<br />";
  17. }
  19. ?>