21 'COUNT_VALID' =>
'APPROXIMATE_COUNT',
22 'COUNT_MATCHED' =>
'APPROXIMATE_COUNT',
23 'SUPPORTED_CONTACT_TYPES' => array(
24 self::ENUM_CONTACT_TYPE_EMAIL,
25 self::ENUM_CONTACT_TYPE_PHONE,
26 self::ENUM_CONTACT_TYPE_IDFA_GAID,
27 self::ENUM_CONTACT_TYPE_INTERNAL_ID
34 'methodName' =>
'marketing.audience.list',
35 'parameters' => array(
36 'accountId' => $this->accountId
39 if ($response->isSuccess())
42 while($data = $response->fetch())
52 public function add(array $data)
55 'methodName' =>
'marketing.audience.create',
59 if ($response->isSuccess())
61 return $response->getData();
70 'methodName' =>
'marketing.audience.contacts.add',
71 'parameters' => array(
72 'accountId' => $this->accountId,
73 'audience_id' => $this->accountId,
74 'contacts' => Json::encode(
84 'methodName' =>
'marketing.audience.contacts.remove',
85 'parameters' => array(
86 'accountId' => $this->accountId,
88 'contacts' => Json::encode(
99 foreach (static::$listRowMap[
'SUPPORTED_CONTACT_TYPES'] as $contactType)
101 if (!isset($contacts[$contactType]))
106 $contactsCount = count($contacts[$contactType]);
107 for ($i = 0; $i < $contactsCount; $i++)
109 $contact = $contacts[$contactType][$i];
110 $contact = hash(
'sha256', $contact);
112 switch ($contactType)
115 $data[$contactType.
'_SHA256'][] = $contact;
119 $data[$contactType.
'_SHA256'][] = $contact;
const ENUM_CONTACT_TYPE_INTERNAL_ID
const ENUM_CONTACT_TYPE_IDFA_GAID
removeContacts($audienceId, array $contacts, array $options)
const ENUM_CONTACT_TYPE_PHONE
importContacts($audienceId, array $contacts, array $options)
prepareContacts(array $contacts=array())
const MIN_CONTACTS_FOR_ACTIVATING
const MAX_CONTACTS_PER_PACKET
const ENUM_CONTACT_TYPE_EMAIL