You are here

public function ApiClient::channelsList in Rocket.Chat 8.2

Same name and namespace in other branches
  1. 8 modules/rocket_chat_api/src/RocketChat/ApiClient.php \Drupal\rocket_chat_api\RocketChat\ApiClient::channelsList()

Retrieve User information.

Parameters

string $offset: What offset do you want to use, 0-based.

string $count: How many do you want to retrieve.

Return value

array Result array.

File

modules/rocket_chat_api/src/RocketChat/ApiClient.php, line 474

Class

ApiClient
Class ApiClient.

Namespace

Drupal\rocket_chat_api\RocketChat

Code

public function channelsList($offset = NULL, $count = NULL) {
  $req = [];
  $req['query'] = [];
  if (!empty($offset)) {
    $req['query']['offset'] = $offset;
  }
  if (!empty($count)) {
    $req['query']['count'] = $count;
  }
  if (empty($req)) {
    unset($req);
    $req = NULL;
  }
  return $this
    ->getFromRocketChat('channels.list', $req);
}