Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
twisted1919 committed Mar 25, 2019
1 parent e273925 commit 4e8dbfb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions MailWizzApi/Endpoint/ListSubscribers.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class MailWizzApi_Endpoint_ListSubscribers extends MailWizzApi_Base
* @param string $listUid
* @param integer $page
* @param integer $perPage
* @param array $fields
* @return MailWizzApi_Http_Response
*/
public function getSubscribers($listUid, $page = 1, $perPage = 10)
Expand Down Expand Up @@ -248,15 +247,21 @@ public function emailSearchAllLists($emailAddress)
*
* @param $listUid
* @param array $fields
* @param int $page
* @param int $perPage
*
* @return MailWizzApi_Http_Response
*/
public function searchByCustomFields($listUid, array $fields = array())
public function searchByCustomFields($listUid, array $fields = array(), $page = 1, $perPage = 10)
{
$paramsGet = $fields;
$paramsGet['page'] = (int)$page;
$paramsGet['per_page'] = (int)$perPage;

$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,
'paramsGet' => $paramsGet,
));

return $response = $client->request();
Expand Down

0 comments on commit 4e8dbfb

Please sign in to comment.