You are here

public static function Channel::getAllGroupsBatched in Rocket.Chat 8.2

Retrieve Chat Private Groups list. (in batch size)

@todo needs better Error checking / missing detection.

Parameters

\Drupal\rocket_chat_api\RocketChat\ApiClient $api:

array $groups:

int $offset:

int $size:

Return value

int Total number of Groups found.

2 calls to Channel::getAllGroupsBatched()
Channel::getChannelProxy in modules/rocket_chat_api/src/RocketChat/Element/Channel.php
Retrieve the Proxy, create the Channel / Group if needed.
Groups::refreshCache in modules/rocket_chat_api/src/RocketChat/Collection/Groups.php

File

modules/rocket_chat_api/src/RocketChat/Element/Channel.php, line 190

Class

Channel

Namespace

Drupal\rocket_chat_api\RocketChat\Element

Code

public static function getAllGroupsBatched(ApiClient &$api, array &$groups, $offset = 0, $size = 500) {
  return self::getAllRoomsBatched($api, $groups, "groups.listAll", $offset, $size);
}