Skip to content

Commit

Permalink
added search-by-custom-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
twisted1919 committed Feb 12, 2019
1 parent 0902309 commit e273925
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions MailWizzApi/Endpoint/ListSubscribers.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,25 @@ public function emailSearchAllLists($emailAddress)
return $response = $client->request();
}

/**
* Search in a list by custom fields
*
* @param $listUid
* @param array $fields
*
* @return MailWizzApi_Http_Response
*/
public function searchByCustomFields($listUid, array $fields = array())
{
$client = new MailWizzApi_Http_Client(array(
'method' => MailWizzApi_Http_Client::METHOD_GET,
'url' => $this->config->getApiUrl(sprintf('lists/%s/subscribers/search-by-custom-fields', (string)$listUid)),
'paramsGet' => $fields,
));

return $response = $client->request();
}

/**
* Create or update a subscriber in given list
*
Expand Down

0 comments on commit e273925

Please sign in to comment.