Unsubscribed emails are found.
campaignUnsubscribes(string $cid, integer $start, integer $limit) : array
campaignUnsubscribes($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignUnsubscribes()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } }
new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId), 'start' => new xmlrpcval(0), 'limit' => new xmlrpcval(1000) ), 'struct'); $f = new xmlrpcmsg('campaignUnsubscribes', 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 "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } } else { echo "Unable to run campaignUnsubscribes()!\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) cid = campaignId start = 0 limit = 1000 retval = api.campaignUnsubscribes(cid, start, limit) if api.errorCode: print "Unable to load campaignUnsubscribes()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: print "E-mails returned: %d" % (len(retval)) for email in retval: print "\t", email