You are here

public function SendinblueApiV3::countUserlists in SendinBlue 7.2

Count all users of lists.

Parameters

array $listids: An array of lists.

Return value

int Number of users.

Overrides SendInBlueApiInterface::countUserlists

File

includes/Api/SendinblueApiV3.php, line 326

Class

SendinblueApiV3
Sendinblue REST client.

Code

public function countUserlists(array $listids = []) {
  $total = 0;
  foreach ($listids as $listid) {
    $userList = $this->sibListsApi
      ->getContactsFromList($listid);
    $total += $userList
      ->getCount();
  }
  return $total;
}