Retrieve all of the lists defined for your user account
- Section:
- List Related
- Parameters:
- uid the id for your user account. Get by calling login($user, $pass)
- Returns:
- array - list of your Lists and their associated information (see Returned Fields for description)
- Returned Fields:
| string | id | The list id for this list. This will be used for all other list management functions. |
| string | name | The name of the list. |
| date | date_created | The date that this list was created. |
| integer | member_count | The number of active members in the given list. |
Examples (1)
[1] xml-rpc_lists.php
<?php
/**
This Example shows how to use the XML-RPC service to Retrieve all of your
Lists, display some info about them, and do some basic error checking.
Note that we are using the PEAR XML-RPC client and recommend others do as well.
**/
require_once 'XML/RPC2/Client.php';
include('inc/config.inc.php'); //contains username & password
$client = XML_RPC2_Client::create($apiUrl);
$uuid = $client->login($username,$password);
try {
$lists = $client->lists($uuid);
foreach ($lists as $list){
echo "[".$list['id']."] -".$list['name']."\n"; }
} catch (XML_RPC2_FaultException $e){
echo $e->getFaultCode()." : ".$e->getFaultString()."\n"; }
?>