Information with email address is passed on the server, and search in lists for a particular email is performed. The whole array of all these lists is returned.
listsForEmail(string $email_address) : array
Array consisting of:
listsForEmail($email_address); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to get lists ID!\n"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "Returned:\n"; foreach ($retval as $id) { echo "\tID = " . $id . "\n"; } }
new xmlrpcval($apikey), 'email_address' => new xmlrpcval($my_email) ), 'struct'); $f = new xmlrpcmsg('listsForEmail', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); echo "Returned:\n"; foreach ($retval as $id) { echo "\tid = " . $id . "\n"; } } else { echo "Unable to get lists ID!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) email_address = my_email retval = api.listsForEmail(email_address) if api.errorCode: print "Unable to get lists ID!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: print "Returned: " if isinstance(retval, dict): for id in retval.items(): print "\tID = ", id elif isinstance(retval, list): for id in retval: print "\tID = ", id